Re: [PHP] Parse Error(newbie)

2002-05-29 Thread 1LT John W. Holmes
Look for errors in the line above this one. PHP doesn't know what SQL is...it's just a string to PHP. ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 9:03 AM Subject: [PHP] Parse Error(newbie) I get a

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread Stuart Dallas
[EMAIL PROTECTED] wrote: $query = SELECT * FROM news ORDER BY id DESC LIMIT 1; I believe that it is an error in the SQL statement Nope, looks fine. Show us the previous few lines, the error is probably in those somewhere. -- Stuart -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then [EMAIL PROTECTED] declared I get a parse error on this line $query = SELECT * FROM news ORDER BY id DESC LIMIT 1; I believe that it is an error in the SQL statement Nothing wrong with that. Let's have the whole error msg and

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread webmaster
- From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 11:08 PM Subject: Re: [PHP] Parse Error(newbie) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then [EMAIL PROTECTED] declared I get a parse error on this line $query = SELECT * FROM

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread Jason Wong
On Wednesday 29 May 2002 21:13, [EMAIL PROTECTED] wrote: Here is the function: function print_new_story(){ $query = SELECT * FROM news ORDER BY id DESC LIMIT 1; $result = mysql_query($query); $num_results = mysql_num_rows($result); for ($i=0; $i $num_results; $i++) { $row =

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread webmaster
: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 11:11 PM Subject: Re: [PHP] Parse Error(newbie) On Wednesday 29 May 2002 21:13, [EMAIL PROTECTED] wrote: Here is the function: function print_new_story(){ $query = SELECT * FROM news ORDER BY id DESC LIMIT 1

RE: [PHP] Parse Error(newbie)

2002-05-29 Thread Niklas Lampén
mysql_query(delete from conf_event where time ( time() ); You're missing the ending there. Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 29. toukokuuta 2002 16:20 To: [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error(newbie) Line 81 is $query

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread Jason Wong
] Subject: Re: [PHP] Parse Error(newbie) Line 81 is $query. I showed it in my first email. I suspect this line is the one causing the trouble(It is about four lines above the start of the function and is the only previous PHP statement) mysql_query(delete from conf_event where time ( time

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread webmaster
Notepad at the moment as I can't change the settings of my computer due to lack of privilages - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 11:26 PM Subject: Re: [PHP] Parse Error(newbie) On Wednesday 29 May 2002 21:22

Re: [PHP] Parse Error(newbie)

2002-05-29 Thread Jason Wong
On Wednesday 29 May 2002 21:45, [EMAIL PROTECTED] wrote: Notepad at the moment as I can't change the settings of my computer due to lack of privilages You have my sympathy :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design

Re: [PHP] Parse Error(Newbie)

2002-05-27 Thread Miguel Cruz
On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: I know it is probably something obvious but the following gives me a parse error and as a newbie I am having trouble locating it. $query = select * from news WHERE id = $_get['id']; A lot of people have answered this already, but just for a

RE: [PHP] Parse Error(Newbie)

2002-05-27 Thread John Holmes
, 2002 2:18 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error(Newbie) On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: I know it is probably something obvious but the following gives me a parse error and as a newbie I am having trouble locating it. $query = select

Re: [PHP] Parse Error(Newbie)

2002-05-27 Thread Matt Giddings
try this: $query = select * from news WHERE id = '$_get['id']'; the double quote right before the $ is ending the string, from that point on everything is an error. Matt On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: I know it is probably something obvious but the following gives me a parse

Re: [PHP] Parse Error(Newbie)

2002-05-27 Thread Matt Giddings
Another thing you may want to try is the following line: $query = select * from news WHERE id = ' . $_get['id'] . '; Matt On Mon, 27 May 2002 [EMAIL PROTECTED] wrote: I know it is probably something obvious but the following gives me a parse error and as a newbie I am having trouble

RE: [PHP] Parse Error(Newbie)

2002-05-26 Thread Martin Towell
$query = select * from news WHERE id = $_get['id']; you've got quotes within quotes - either change the inner quotes to single quotes, or escape them $query = select * from news WHERE id = '$_get[id]'; or $query = select * from news WHERE id = \$_get['id']\; -Original Message- From:

RE: [PHP] Parse Error(Newbie)

2002-05-26 Thread Peter
can you show us the lines above that line? say the previous 2 lines?.. also depending on what server your on you might want to try $query = SELECT * FROM news WHERE id = $_get['id']; but that line is ok ... with parse errors it's often, well i've found this any way, that it's the line above the

RE: [PHP] Parse Error(Newbie)

2002-05-26 Thread David Freeman
-Original Message- I know it is probably something obvious but the following gives me a parse error and as a newbie I am having trouble locating it. $query = select * from news WHERE id = $_get['id']; -Original Message- Any time you end up with two characters together is a

Re: [PHP] Parse Error(Newbie)

2002-05-23 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then [EMAIL PROTECTED] declared I get a parse error on line 114 can anyone see the problem? Sorry if it is something obvious :} for ($i=0; $i $num_results; $i++) 110. { 111. $row = mysql_fetch_array($result); 112. echo 'a

RE: [PHP] Parse Error(Newbie)

2002-05-23 Thread Brian McGarvie
why now just write: for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo a href=\.$row['url'].\link text/a; -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: 23 May 2002 12:28 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error

Re: [PHP] Parse Error(Newbie)

2002-05-23 Thread Rénald CASAGRAUDE
On jeudi, mai 23, 2002, at 01:27 , Nick Wilson wrote: I get a parse error on line 114 can anyone see the problem? Sorry if it is something obvious :} for ($i=0; $i $num_results; $i++) 110. { 111. $row = mysql_fetch_array($result); 112. echo 'a href='; 113. echo $row['url']; 114. echo