Here is my current query:
$qAnnouncement =
'SELECT id,headline
FROM tbl_funding
WHERE 1
AND ((UNIX_TIMESTAMP (datestamp) >= ' .
strtotime($attributes[startdate]) . ') AND (UNIX_TIMESTAMP (datestamp)
<= ' . strtotime($attributes[startdate]) . ')) LIMIT 0, 30';
Where datestamp is set in MySQL wi
Hi all,
I posted earlier with some date questions, but realized I could
probably do better with my question presented as such.
I need to save the time date and time of posting for the records in a
table.
I then need to be able to search via a startdate and enddate text field
where the user wil
If I am going to use date('U') to insert an epoch timestamp into a
mysql table, what is the appropriate field type to use?
thanks
charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a form which uploads a file to my server. The files that are
uploaded will be .doc files and will need to be able to be downloaded
from a web page.
My script works locally - I have tested it well files upload etc., but
I am moving it to a commercial web server and am not sure what
permi
Hi all,
I have this query:
SELECT a.area_name, b.area_name FROM tbl_1 x, tbl_2 a, tbl_2 b
WHERE x.area_1 = a.id
AND x.area_2 = b.id
I am using PEAR DB to get my results as an ASSOC ARRAY. How do I echo
the values for a.id and b.id?
Thnks
Charles
--
PHP General Mailing List (http://www.php.net/)
Thanks for the help. Almost there. Here is what I have:
SELECT x.id, x.headline, x.description, a.area area_a, b.area area_b
FROM tbl_funding x, tbl_dra a, tbl_dra b
GROUP BY x.id LIMIT 0 , 30
The problem is that $array[area_a] and $array[area_b] display the same
info.
On Friday, March 7, 2
same.
Jim
- Original Message -----
From: "Charles Kline" <[EMAIL PROTECTED]>
To: "Rich Gray" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 10:03 AM
Subject: Re: [PHP] MySQL Alias and PHP
Thanks for the help. Almost there. Here is what I have:
--
Un gran saludo/Big regards...
Arturo Barajas, IT/Systems PPG MX (SJDR)
(427) 271-9918, x448
-Original Message-----
From: Charles Kline [mailto:[EMAIL PROTECTED]
Sent: Viernes, 07 de Marzo de 2003 04:09 p.m.
To: Jim Lucas
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL Alias and PHP
Thanks f
Can anyone tell me why this code does not return true when the file in
the directory cherpdocs/ with the file (which I see as being there)
does exist?
if(file_exists('cherpdocs/$annrow[id].doc')){
echo "Funding
details paper";
}
This is a path relative to the file calling it, should i
Can anyone point me to a good resource on how to run PHP with CGI Wrap?
I am hosting a site that is under development at Pair networks and they
have their own cgi-wrapper and I need to move this site to another
server that probably does not have their own flavor of this. Any help
would be appre
I am trying to get this sql query to work and am getting the error
"Insufficient data supplied". Can anyone help with this?
$sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) name
FROM tbl_personnel "WHERE name LIKE \'%";
$sql .= $attributes['nametofind'];
$sql .= "%\' ORDE
On Thursday, March 13, 2003, at 05:08 PM, Ernest E Vogelsinger wrote:
- if your query is exactly as you sent it here you're missing a comma
after
the closing bracket of "concat()", just before "name"
name is supposed to be an alias for the concatenated values of
fname,lname,mname.
Let me try to
Hi all,
My first try at MySQL Full Text Search and it is not behaving ;)
Here is what I have for my query string:
$sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) as name".
" FROM tbl_personnel WHERE MATCH (fname,lname) AGAINST ('" .
$attributes['searchstring'] . "')";
Th
Can I have a single SQL string do INSERTS into multiple tables?
Like:
sql="INSERT INTO tbl_1 (id,
email_address_1)
VALUES ($v_personid,
'$v_email');
INSERT INTO tbl_2 (person_id,
interest_id)
VALUES ($v_personid,
$v_int1);";
Or do I need to break them up and use tw
Hi all,
I have an array that gives me this when I do:
print_r($my_array);
Array
(
[0] => Array
(
[dra_id] => 5
)
[1] => Array
(
[dra_id] => 8
)
[2] => Array
(
[dra_id] => 9
)
)
using a foreach() I wa
Hi all,
Is or has anyone here been part of or started a PHP user group? I am
thinking it would be a great thing to get started in my area (maybe one
already exists?) and I was looking for suggestions on how to go about
it and things to know before getting started, etc.
BTW. I live in Southern N
Tom,
This seems like what I need exactly, but I am having a bit of trouble
getting it to work.
Here is how I have worked around this, but I know there is a 'real' way
to do this. Any thoughts? I had to set the variables, or should I just
use the variables as ${dra_0} etc.?
// get the values f
Check the permissions on the directory you are trying to upload your
files. The host I am using required me to either chmod the upload
directory to 777 (not what I wanted to do) or run PHP with cgi-wrap
enabled - this allowed my PHP application to run as the user and
therefore had permission to
Not sure how to answer your question as I am real new to PHP, but you
may want to look at PEAR if you have not done so. I know there are
libraries that folks have been talking about recently that handle just
these sorts of things. If you don't use them - you may find your
answers by looking at
On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:
How do i delete a file ... ?
kill?? dele *srugs*
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
$result = unlink("file.txt") or die("Operation failed!');
On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:
How do i delete a file ... ?
kill?? dele *srugs*
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (ht
Hi all,
I am inserting data from a form into a mySQL database. I am using
addslashes to escape things like ' in the data input (this is actually
being done in PEAR (HTML_QuickForm).
The weird thing is that the data gets written into the table like:
what\'s your problem?
WITH the slash. I am
php has a function stripslashes() you could try using.
- charles
On Monday, March 17, 2003, at 10:11 AM, Ian A. Gray wrote:
Using the \ or using single quotes instead of double
is great. However I am now finding a problem if
someone inputs either single or double quotes on a
form which uses php
John,
You are right, something was adding the additional slash. I removed the
addslashes() and it fixed the problem. Something I am doing must
already be handling that... will step through the code AGAIN and see if
I can find it.
- Charles
On Monday, March 17, 2003, at 12:19 PM, John W. Holme
What is the difference as in... why one or the other?
include('somefile.php');
include("somefile.php");
Just wondering...
- ck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
somefile_{$foo}");
will include the file 'somefile_bar'
HTH.
Charles Kline wrote:
What is the difference as in... why one or the other?
include('somefile.php');
include("somefile.php");
Just wondering...
- ck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the expected return when using strtr() to compare a string to
an empty string?
example:
$myval = strstr('bob', '');
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Just wondering. I am trying to decide whether to build a FreeBSD server
or other... open to suggestions
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Was reading this and it sounds really cool. I do work as a consultant
to designers and thought this may be a good way to improve work flow? I
have read mixed thoughts on this, but was wondering what this list
thought? Anyone using it? Real world?
http://www.zend.com/zend/tut/tutorial-cezar.php
Hi all,
I have a form where users will be adding publication dates for uploaded
files. I want to store the date in mySQL as date('U') format. If the
date is entered as mm/dd/ - will the date function know this or is
there some way of 'telling' php how the date to be converted is
formatted,
hi all,
i have a question about a good method of handling this challenge.
i have a table that contains articles. i have another table which
contains the order 1 - 9 that i would like to display them in.
this part is done, and is not a problem. here is where I am not sure
how to proceed.
1. t
Pear is really nice. I am very happy with it.
- Charles
On Thursday, March 20, 2003, at 02:56 PM, Merritt, Dave wrote:
All,
I've always used MySQL databases and the MySQL functions in PHP for my
code
in the past. However, I'm now working on a project that I want the
project
to be able to be
is_numeric(yoursting);
this returns true if string is a number
On Thursday, March 20, 2003, at 08:32 PM, Orlando Pozo wrote:
Hello all, I am Orlando Pozo
How could I verify if a variable is a "Numeric string"? , I need help
in this; for example when I submit a form, all texts fields are sent
Hi everyone,
I have ALMOST gotten this working (mySQL part works).
I have gotten the advice that this is easier to do in PHP then to try
and make this query work in mySQL. Here is the query and a sampling of
the current results (from phpMyAdmin)
SELECT p.fname, p.lname,
w.web_li
hi
Could anyone give me an example of a prepare() and execute() that
retrieves a simple dataset as an associative array and then prints it
to the screen? I can only seem to find examples that do an INSERT and I
am having trouble doing the translation.
Thanks
charles
--
PHP General Mailing List
If the page does not submit between changes, PHP will not be much help,
that would be JavaScript's job. You could use PHP to prepare the arrays
that JavaScript will use to accomplish this.
- Charles
On Monday, March 24, 2003, at 11:32 AM, Keven Jones wrote:
Hi,
Can someone tell me if I can us
hi all,
i have a textarea in a form which gets inserted into a table in my
database (mySQL). When displaying this text back to the screen, how do
i retain the line breaks etc. that were in the original input?
thanks
charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
I am by no means an expert (even remotely) but I do recall instructions
on exactly how to do this in the documentation for MySQL - I think
under the "how to upgrade" section.
- Charles
On Monday, March 3, 2003, at 06:53 PM, Stephen Craton wrote:
Hello,
Yesturday I made a big mistake. I had to
I hang my head in shame... yes. As a matter of fact, I did on my second
skim through my PHP ref. manual... thanks for the pointer just the same.
- charles
On Tuesday, March 25, 2003, at 05:38 PM, CPT John W. Holmes wrote:
i have a textarea in a form which gets inserted into a table in my
databa
hi all,
using html_quickform (pear) and it has a date type that passes the date
info like this:
array(24) {
["lr_pub_date"]=>
array(3) {
["m"]=>
string(1) "3"
["d"]=>
string(2) "12"
["Y"]=>
string(4) "2003"
}
I am used to getting this data like:
$form->getSubmitVal
rint/echo it? That converts it to a string first.
Either print_r it, var_dump it, or do something else with it.
Charles Kline wrote:
hi all,
using html_quickform (pear) and it has a date type that passes the
date info like this:
array(24) {
["lr_pub_date"]=>
array(3) {
[&
Great. Thanks.
- Charles
On Wednesday, March 26, 2003, at 09:48 PM, Leif K-Brooks wrote:
Yes, but you can't put put the single quoted array key directly in the
double-quotes string, try:
$thedate = $lr_form->getSubmitValue('lr_pub_date');
echo "The month: {$thedate
I am storing my dates as unix timestamp (epoch). Am I right in assuming
that if I need to add or subtract days from this it is done in seconds?
So for example if I have the timestamp 1041397200 and I wanted to
subtract 24 hours from it I would do this:
$newtime = $orig_time - 86400;
Thanks,
Ch
, 2003 09:15 pm, Charles Kline wrote:
I am storing my dates as unix timestamp (epoch). Am I right in
assuming that if I need to add or subtract days from this it is
done in seconds?
yes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP
e ( 0, 0, 0, 1, 1, date['Y']); // first day of this
year
$end = mktime ( 0, 0, 0, 12, 31, date['Y']); // last day of this year
then select all record where timestamp >= $start and timestamp <= $end
should do the job
Hope this helps
Foong
"Charles Kline" <[EM
try the checkdate() function. i think that will do what you need.
On Monday, March 31, 2003, at 11:06 PM, Ben C. wrote:
How do I easily check to see if a MySQL formatted date is valid such
as if a
user enters
2003/02/28 would return true
2003/02/31 would return false
I have check the manual an
hi there,
if this:
$res_pform->getSubmitValue("investigator5");
returns an array, how do I get to the individual values in that array
without first setting it to a variable like:
$myvar = $res_pform->getSubmitValue("investigator5");
echo $myvar['field'];
thanks
charles
--
PHP General Mailing
he keys without setting it first to a variable
(which is the only way I know how to now).
Thanks,
Charles
On Tuesday, April 1, 2003, at 03:18 PM, Dan Joseph wrote:
Have you tried:
extract ($myvar = $res_pform->getSubmitValue("investigator5"));
-Dan Joseph
-----Original Message-
Hello all,
I have a text blurb that is on the home page of a site. I need to make
this block of text editable through a form in the admin section of the
site. Is it worth having a table in the db or would I be better off
writing to a file for this?
Thanks,
Charles
--
PHP General Mailing List
Hi all,
I am reading the content of a text file into a variable to be used in a
javascript. I am reworking some code that was originally done using
ColdFusion and the jsStringFormat(var) function. What is the PHP
equivalent string function? Is there one? I have searched the docs, but
can't fig
Hi all,
How would i go about stripping all newlines from a string?
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/str_replace
$newstr = str_replace("\n", "", $oldstr);
- Original Message -
From: "Charles Kline" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 08, 2003 10:44 PM
Subject: [PHP] stripping newlines from a string
Hi all,
How woul
What methods are available (ups and downs) for encrypting and
serializing php applications for sale?
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-encoder.php
On Saturday 06 September 2003 01:59 pm, Charles Kline wrote:
What methods are available (ups and downs) for encrypting and
serializing php applications for sale?
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General
I have a project in mind where I would like to be able to Sync my Palm
with the calendar in my CRM. Anyone have info on doing this?
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anyone have suggestions for open source shopping cart apps in PHP?
Thanks,
Charles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all,
I could use some advice/pointers on a sold method for achieving this
feature on a site I am building. One of the features is an event
calendar. The events are listed by date, not in a calendar view, but a
list with a short description of the event. This part is no problem.
What I am not
Hi all,
I have a new client (a design company). They have never developed a
dynamic website at all and do all their HTML editing using Dreamweaver.
When I build sites, I am used to using a class for pages. Many of the
pages in this site are totally static except for a few elements (Bread
Crumb,
I understand how the pages are designed etc. What I wanted to
understand better was how the pages were being displayed using PHP. I
guess it is obvious now after getting a few responses, that the HTML is
stored in a table, perhaps one record per page... then you just query
the story_id and page
Yea, But then I took his advice and found this
http://www.catb.org/~esr/faqs/smart-questions.html#keepcool so I was
not so offended :)
I had all the other links, but that one and did not think my question
was that "out there" for the list... oh well.
On Aug 17, 2004, at 12:31 PM, Jason Davidso
On Aug 17, 2004, at 1:04 PM, Matthew Sims wrote:
hn C. Nichel
OMG, John. You broke through to someone. This could be good sign. Now
if
we can just get him to stop top posting he'll be ready for anything. ;)
oops... now i got it! :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
On Aug 31, 2004, at 9:18 PM, raditha dissanayake wrote:
rogue wrote:
Sorry if this is the wrong place for this post. I am having problems
where PHP templates that I modify via ftp are not showing changes for
like 1 minute or so. I assume this is some kind of server caching but
I am not sure how
Hi all,
Not sure if I am doing this right and I can't figure it out, was
hoping someone here can help.
I have an organization table in mySQL. Pretty standard. My first
function getDepts() is working as I intend and returning the tree
just as I like it. The new piece I added in there that is
Hi all,
I was having a conversation with a friend and talking about coding
standards in the open source community (focusing on PHP). I seem to
remember there being a document out there that sort of laid it out
pretty well.
Anyone know where I might find a copy?
Thanks,
Charles
--
PHP General Ma
Hi all,
I am using fgetcsv() to get a tab delimited text file into an array. It
gives me an array in this format:
Array
(
[0] => Array
(
[0] => 97
[1] => Effects of Slow Heating Rates on Products of
Polyethylene Pyrolysis
)
[1] => Array
(
Thanks!!!
On Jul 22, 2004, at 11:39 PM, Justin Patrin wrote:
On Thu, 22 Jul 2004 23:34:56 -0400, charles kline
<[EMAIL PROTECTED]> wrote:
Hi all,
I am using fgetcsv() to get a tab delimited text file into an array.
It
gives me an array in this format:
Array
(
[0] =&
hi all.
i am trying to modify some old code and struggling a bit with this one:
// returns an array of the names in the form post
$fields = $_SESSION['case']->getComplaintKeys();
// here is the array returned
Array ( [0] => eligibility [1] => payment [2] => service [3] =>
document [4] => lice
My buddy just called me and let me know he found this running on his
server.
I have googled it and come up with much, but it appears to be a php
script that gives the user pretty much total control of adding,
editing, deleting - files, folders, etc. As well as giving them
access to run an
Turned out to be a security hole in Mambo. He has fixed it. Thanks
for your assistance.
- Charles
On Mar 30, 2006, at 3:33 PM, Brady Mitchell wrote:
-Original Message-
Does anyone know anything about this, and if they do - have any
thoughts on how it may have gotten on the server and
Hi all.
I can't seem to figure this one out. I am trying to output a string
for a javascript that builds a DHTML tree. The sample string looks
like this:
[
['Executive Director', null, null,
['Executive Assistant ', null, null],
['Operations Director', null, null,
hi all.
i have 2 class files. say for example.
class 1
class 2 extends class 1
class 2 uses include_once("firstclass.php")
then i use include_once ("secondclass.php") in my template. this does
not work. to get it to work, i must put both the files as includes in
my template.
any ideas w
On May 25, 2005, at 7:53 PM, Richard Lynch wrote:
On Wed, May 25, 2005 11:30 am, Charles Kline said:
i have 2 class files. say for example.
class 1
class 2 extends class 1
class 2 uses include_once("firstclass.php")
then i use include_once ("secondclass.php") in my
Hi all,
I have an application where I need to allow the admin of a site to
upload PDF files for download by their clients.
I am uploading files to a directory ABOVE the web root, but I have no
clue what the best way to have a link on the site to allow for
downloading those files by visito
I am confused on how to get to the data in this object, anyone help
me out?
here is the result of my var_dump() which is inside a class function
functionTest($data){ var_dump($data); }
object(staff)(2) {
["arrStaff"]=>
array(12) {
["bsStaffID"]=>
string(4) "9090"
["bsLastNam
On Sep 27, 2005, at 12:07 PM, Charles Kline wrote:
I am confused on how to get to the data in this object, anyone help
me out?
here is the result of my var_dump() which is inside a class
function functionTest($data){ var_dump($data); }
object(staff)(2) {
["arrStaff"]=&g
Hi all,
I have a script that needs to update data in two databases. My db
connections are both in class files that I created to execute the
various connections and queries.
What is happening is that the second database connection does not
seem to work. The error I get is that it seems the
On Sep 27, 2005, at 3:42 PM, Andy Pieters wrote:
Hi
Without you actually showing us these class files we can only guess
but a
common mistake is this:
mysql_open(connection details)
mysql_query(query)
In those cases the last opened handle is used. To prevent this,
use this
syntax
$db
On Sep 27, 2005, at 5:23 PM, M. Sokolewicz wrote:
Charles Kline wrote:
On Sep 27, 2005, at 3:42 PM, Andy Pieters wrote:
Hi
Without you actually showing us these class files we can only
guess but a
common mistake is this:
mysql_open(connection details)
mysql_query(query)
In those
78 matches
Mail list logo