corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Any Database kids online


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Any Database kids online
liamC
Member

Registered: 28th Feb 04
User status: Offline
27th Mar 07 at 14:30   View User's Profile U2U Member Reply With Quote

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
27th Mar 07 at 14:37   View User's Profile U2U Member Reply With Quote

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
27th Mar 07 at 14:42   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
27th Mar 07 at 14:53   View Garage View User's Profile U2U Member Reply With Quote

You need a semi-colon on the line above.
liamC
Member

Registered: 28th Feb 04
User status: Offline
27th Mar 07 at 15:04   View User's Profile U2U Member Reply With Quote

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
27th Mar 07 at 15:04   View User's Profile U2U Member Reply With Quote

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

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
car insurance set to rise by £60? mk4_astra General Chat 5 1408
26th Jan 04 at 20:15
by Nath
 
making a website Dave A Geek Day 59 3746
2nd Oct 06 at 19:45
by CorsaChris12
 
Tax/Insurance Question stubs General Chat 5 441
3rd Oct 06 at 07:53
by stubs
 
MYSQL Database liamC Geek Day 3 799
18th Dec 06 at 17:57
by aPk
 
Any vBulletin guys out there? Andrew Geek Day 9 1040
15th Feb 07 at 08:24
by Andrew
 

Corsa Sport » Message Board » Off Day » Geek Day » Any Database kids online 29 database queries in 0.0123150 seconds