Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-06-2004, 10:08 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Parse Error

I keep on getting a parse error on this line:
PHP Code:
$result mysql_query (select FROM News$db); 
? It is really bugging me!
Reply With Quote
  #2  
Old 08-06-2004, 10:09 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Parse error: parse error, unexpected T_STRING in /www/htdocs/zp/phptest/index.php/index.php on line 22
That's the parse error
Reply With Quote
  #3  
Old 08-06-2004, 10:31 AM
Lakie is offline Lakie

Join Date: Mar 2002
Posts: 5,540

it may not be that line spifically, and im still a newbie to php but try
PHP Code:
$result mysql_query("SELECT * FROM News"$db); 
what baout a where statement?
Reply With Quote
  #4  
Old 08-06-2004, 12:16 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

thanks that got me past a few errors.
Reply With Quote
  #5  
Old 08-06-2004, 09:32 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,968

A lil tut...


If you are using a function (like mysql_query) you need to start the function off with a ". Unless it's a variable already set in php.

mysql_query(select * From); Will give a phrase error.

mysql_query("select * From"); Will not.


Unless you are using something like this:

$query="SELECT * FROM";

mysql_query("$query"); or mysql_query($query); will work..



Same goes with other functions, mkdir(Folder); will not work, mkdir("Folder"); will work.

$folder="Folder";
mkdir("$folder"); or mkdir($folder); will work..


In some instances this will not work, with like the empty function, it cannot have any "'s in it. empty("$result"); will give a phrase error. empty($result); will not.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DFLW Swapfile error fix error Hellfighter Tech Support 0 02-29-2008 03:35 AM
installing DFBHD, I get an error, “An error occurred during the move data process.” Steve Delta Force 1 01-09-2007 04:54 AM
Parse Me! atholon Web design and Programming 12 07-01-2005 11:53 PM
If your getting an error with Team Speak with the Richedit Line Insertion Error READ .DareDevil. Hardware and Software 0 09-29-2004 03:50 PM
PARSE ERROR!!!! help plz BeBop Web design and Programming 4 04-05-2003 10:28 AM


All times are GMT -5. The time now is 12:02 PM.




Powered by vBulletin®