mrwebbie Posted September 11, 2006 Share Posted September 11, 2006 Okay, a little background. I didn't write these databases or create the php pages. So, you'll need to be gentle with me. :) I know enough to be dangerous, but I'm mainly just a maintainer here...not a designer.Anyway, I was recently moved to an upgraded server by my host, and in the process, we went ahead and upgraded to PHP 5.0. I have two databases with 5 applications running off of one and one off of the other. Everything is working just fine on the database with the multiple applications, but on the other database, I have a problem with two functions. The first searchs for a record so it can be updated. You can get to a point where you can choose the record you want, but when you do, this is the error you get: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 1Here is the code in line 1 -- <?php require_once('Connections/julian.php'); ?>Okay, the second error is from a page that functions similar to the one above but it will actually delete a record. Again, you can get to a point where you can select the record you want to delete, but then you get this error: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 'and clients.advocate_id = advocates.advocate_id and clients.race_id = race.race_' at line 1Here is the code in line 1 --<?php require_once('Connections/julian.php'); ?>Obviously, even a noob like me can see that the line 1 thing may not be the issue. So, I'm really at a loss. It is just weird that these are the only two things that are giving me any problems.So please help! :)Nick Quote Link to comment Share on other sites More sharing options...
trq Posted September 11, 2006 Share Posted September 11, 2006 These are sql errors, not php. You need to find (and post) the relevent sql statements. Quote Link to comment Share on other sites More sharing options...
mrwebbie Posted September 11, 2006 Author Share Posted September 11, 2006 Hmm, and to totally cop to my ignorance, how would I do that? Quote Link to comment Share on other sites More sharing options...
mainewoods Posted September 11, 2006 Share Posted September 11, 2006 you need to load the source file specified into an editor:[code]<?php require_once('Connections/julian.php'); ?>[/code]-the error is within the 'Connections/julian.php' file Quote Link to comment Share on other sites More sharing options...
mrwebbie Posted September 12, 2006 Author Share Posted September 12, 2006 Okay, that makes sense, however, the julian.php file is identicle to connection file. So, I am not sure why it would be the problem here.Here is the copy of the connection file: (I've X'd out the username and password)<?php# FileName="Connection_php_mysql.htm"# Type="MYSQL"# HTTP="true"$hostname_julian = "localhost";$database_julian = "juliancenter_org_-_vawa";$username_julian = "XXXXXXXX";$password_julian = "XXXXXXXX";$julian = mysql_pconnect($hostname_julian, $username_julian, $password_julian) or die(mysql_error());?>I'm so confused :) Quote Link to comment Share on other sites More sharing options...
mainewoods Posted September 12, 2006 Share Posted September 12, 2006 If it is complaining about sql syntax, then it would be the sql used in the function:mysql_query();you don't show that function or the sql code in it above Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.