[PHP] dates from db

2001-03-07 Thread Matt Davis
I am calling on a number of fields from my db one of which is a date. When the date displays it is in the following format -MM-DD 00:00:00 I Want it to only display the date and not the time like this -MM-DD Is it possible to remove the time when calling on it from the db can anyone h

[PHP] can you have two sql statements on the same page.

2001-03-21 Thread Matt Davis
I want to extract 2 sets of data each from different tables in the same db but display the results on the same page at the same time. Can I just have two sql statements like this or do I need to do something else. //sql statement 1 $sql1 = "select club_full_name from clubs where club_n

[PHP] php on PWS

2001-05-15 Thread Matt Davis
I am trying to install PHP 4.05 CGI onto my WIN 98 machine which is running PWS once have followed all the instructions but when I try to run a php script I get a HTTP 500 error. I have checked that my registry entry is pointing to the right place. Does anybody have any ideas how to fix this.

[PHP] php_track_vars

2001-05-18 Thread Matt Davis
Until recently I have been using php3 on a linux webserver. Most of my sites uses php_track_vars at some point. I have just set up PHP 4 on my NT webserver in house to use a development machine rather than uploading everything to test it. This has been great and has been saving me a lot of time,

[PHP] Line breaks in PHP

2001-03-29 Thread Matt Davis
I have a form that edits the text on a web page by putting the data into a db and then outputting to the webpage when it is called. When I enter my text into my form I use the return key to start new lines, but when the text appears on my webpage it has no line breaks so the text just wraps to

[PHP] PHP Training

2001-04-02 Thread Matt Davis
Hi, is anyone aware of any php training courses available in the UK or alternativly any online anywhere. Thanks Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrato

[PHP] Date formatting

2001-04-06 Thread Matt Davis
Hi I am trying to format a date extracted from my DB. I have run my query and then have used the following to get my row data while ($row = mysql_fetch_array($sql_result)) { $title = $row["message_title"]; $message = $row["message"]; $event

[PHP] javascript in PHP statements

2001-02-15 Thread Matt Davis
possible to make this work if "top.upper.villagename" is my javascript variable this would save having to write many php pages as i could just use the a generic one with the javascript variable changing. Thanks Matt Davis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] SQL statement in PHP

2001-02-16 Thread Matt Davis
Can anybody help with this If I put the following statement in PHP my browser tells me that there is an error on the line. //create sql statement $sql = "select Business_Name,Trading_Details where Business_Type = "Consultancy" and Bassingbourn != "0" from Main"; If I remove where B

[PHP] displaying more than one result

2001-02-16 Thread Matt Davis
I have a php script which runs a query and then outputs the results in to html. The html should repeat itself depending on the number of results. i.e to produce search results. I know that my current query should return 5 results however it is only show the last one. Is there something I need to

[PHP] display mor than one result.

2001-02-16 Thread Matt Davis
Can Anybody help with this code it is currently only listing the very last entry record in my db however i want it to list however many the query finds can anybody see what I am doing wrong. thanks Matt. Business Search "; } else { $m

[PHP] php variables in sql statements.

2001-02-19 Thread Matt Davis
Can someone tell me if this is possible. I have a PHP variable which i got from a html form using $HTTP_POST_VAR. I collect a variable called Community. Therefore is it possible to have an sql statement like this? //create sql statement $sql = "select businessname from main where businesst

[PHP] redirect if sql = nothing

2001-02-20 Thread Matt Davis
If my SQL returns no results then i want to redirect to a page saying no results etc but if results are found then I want it to continue on down the script how would i do this. Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

RE: [PHP] redirect if sql = nothing

2001-02-20 Thread Matt Davis
{ > do this; >} else { > do this; >} > >I think ? > >-Brian >** > > > -Original Message- > > From: Matt Davis [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, February 20, 2001 11:33 AM > > To: Php Mailing List