liamC
Member
Registered: 28th Feb 04
User status: Offline
|
I've generated a recordset in dreamweaver for a drop down box, but the code is giving me a 'Parse error: syntax error, unexpected T_VARIABLE'.
A snippet of the end of the code.
@mysql_select_db("databasename",$db)
$query_fldMAKE = "SELECT fldMAKE FROM tblMAKE ORDER BY fldMAKE ASC";
$fldMAKE = mysql_query($query_fldMAKE, $GMD) or die(mysql_error());
$row_fldMAKE = mysql_fetch_assoc($fldMAKE);
$totalRows_fldMAKE = mysql_num_rows($fldMAKE);
?>
I am getting a "Parse error: syntax error, unexpected T_VARIABLE" on the line in bold. Any ideas? Dreamweaver is the one that's generating the code as well!
|
AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
Looks fine to me - I usually don't pass a second argument to mysql_query though.....
ie. mysql_query($query_fldMAKE) or die (mysql_error());
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Can you post the entire code?
Although PHP is telling you the error is because of that line, i'm almost 100% sure it isnt.
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
You need a semi-colon on the line above.
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
quote: Originally posted by James
Can you post the entire code?
Although PHP is telling you the error is because of that line, i'm almost 100% sure it isnt.
Correct!!
quote: Originally posted by aPk
Looks fine to me - I usually don't pass a second argument to mysql_query though.....
ie. mysql_query($query_fldMAKE) or die (mysql_error());
Dreamweaver is adding its own connection code at the top which doesn't co-incide with mine, and I'm having to piss about with it everytime, so I'm taking the required code from other pages which actually works, hence the second bit. It's fucking my database names etc up.
quote: Originally posted by Ian
You need a semi-colon on the line above.
Cheers!!
---
All done folks, cheers. Much appreciated
|
AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
quote: Originally posted by Ian
You need a semi-colon on the line above.
Or that. Why do I always try and over complicate things
|