PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
sirstrumalot
Forum Commoner
Posts: 27 Joined: Mon May 18, 2009 10:26 pm
Post
by sirstrumalot » Thu May 21, 2009 9:11 am
I'm trying to set this but I must be messing up the syntax on the variable ($row_userinfo['user_ProviderName']) Any ideas?
The message I get is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Code: Select all
mysql_select_db($database_contacts, $missed_visits);
$query_missed_visits = "SELECT * FROM missedVisit WHERE missed_provider = ".$row_userinfo['user_providerName']." $sorder";
$missed_visits = mysql_query($query_missed_visits, $missed_visits) or die(mysql_error());
jaoudestudios
DevNet Resident
Posts: 1483 Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey
Post
by jaoudestudios » Thu May 21, 2009 9:38 am
Whats in $sorder?
Show us the final query (after php) and we can adjust it as required, then you can play with php to auto gen it
Eran
DevNet Master
Posts: 3549 Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME
Post
by Eran » Thu May 21, 2009 9:42 am
user_providerName is probably a string and needs to be quoted