[PHP-DB] ummm i am confused
i get the following error: Parse error: parse error, unexpected ';' in C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\runescape\runerunner\s ervices.php on line 4 from the following code: ?php //Database Querys $dbconn = mysql_connect($dbHost , $dbName , $dbPassword) or die(Could not connect to server, incorrect username, password or host : .mysql_error(); $connection=Mysql_connect($dbHost , $dbName , $dbPassword) //function zone //creates table function tablecreate($num,$connection){ $items=mysql_query('SELECT Row_Decription, Required_Items, Misc FROM RuneRunner WHERE ID = $num',$connection); $item=mysql_fetch_array($items); $users1=mysql_query('SELECT RuneRunner.rune, RuneRunnerprices.price FROM RuneRunner INNER JOIN RuneRunnerprices ON RuneRunner.User_Id = RuneRunnerprices.User_Id WHERE RuneRunnerprices.ID = $num AND RuneRunnerPrices.user_id = 1',$connection); $user1=mysql_fetch_array($users1); $users2=mysql_query('SELECT RuneRunner.rune, RuneRunnerprices.price FROM RuneRunner INNER JOIN RuneRunnerprices ON RuneRunner.User_Id = RuneRunnerprices.User_Id WHERE RuneRunnerprices.ID = $num AND RuneRunnerPrices.user_id = 2',$connection); $user2=mysql_fetch_array($users2); print ('trtd' . $item[1] . '/tdtdimg src=module/runescape/Runerunner/' . $user1[1] . '.gif' . $user1[2]. 'brimg src=module/runescape/Runerunner/' . $user2[1] . '.gif' . $user2[2]. '/tdtd' . $item[2] . '/td/tr'); }; //this function is called by another function picscreate($Rune,$username,$num){ print('img src=module/runescape/Runerunner/' . $Rune . '.gif' . $username . 'br'); ${'' . $num . ''}=$Rune; }; //gets data form database and sends it to pics() Function picspprep($usernum,$connection){ $pict=mysql_query('SELECT username,rune FROM RuneRunner WHERE User_ID = $usernum',$connection); $pic=mysql_fetch_array($pict); picscreate($pic[1],$pic[2],$usernum); }; ? iubWelcome to the RuneRunners Runescape service page/b/u/ibr iThe currrent Runerunners are:br !--begin Database Data-- ?php picspprep(1,$connection); picspprep(2,$connection); ? !--end Database Data-- hr To order a service, click on the running rune below that matches the one on the player you want to buy from above /i table cellspacing=2 cellpadding=2 border=1 tr tdService/td tdPrices/td tdRequired Items/td /tr !--loop database data to create table-- ?php $id=1; while($id=296){ tablecreate($id,$connection); $id=$id+1; }; ? !-- end loop -- /table -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] ummm i am confused
oh... duh why didn't i see that Mikhail U. Petrov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! Insert one more bracket! ?php //Database Querys $dbconn = mysql_connect($dbHost , $dbName , $dbPassword) or die(Could not connect to server, incorrect username, password or host : .mysql_error()); -this bracket!!! $connection=Mysql_connect($dbHost , $dbName , $dbPassword) Saturday, June 26, 2004, 7:23:30 PM, water_foul wrote: w i get the following error: w Parse error: parse error, unexpected ';' in w C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\runescape\runerunner\s w ervices.php on line 4 w from the following code: w ?php w //Database Querys w $dbconn = mysql_connect($dbHost , $dbName , $dbPassword) wor die(Could not connect to server, incorrect username, w password or host : .mysql_error(); w $connection=Mysql_connect($dbHost , $dbName , $dbPassword) w //function zone w //creates table w function tablecreate($num,$connection){ w $items=mysql_query('SELECT Row_Decription, Required_Items, Misc FROM w RuneRunner WHERE ID = $num',$connection); w $item=mysql_fetch_array($items); w $users1=mysql_query('SELECT RuneRunner.rune, RuneRunnerprices.price FROM w RuneRunner INNER JOIN RuneRunnerprices ON RuneRunner.User_Id = w RuneRunnerprices.User_Id WHERE RuneRunnerprices.ID = $num AND w RuneRunnerPrices.user_id = 1',$connection); w $user1=mysql_fetch_array($users1); w $users2=mysql_query('SELECT RuneRunner.rune, RuneRunnerprices.price FROM w RuneRunner INNER JOIN RuneRunnerprices ON RuneRunner.User_Id = w RuneRunnerprices.User_Id WHERE RuneRunnerprices.ID = $num AND w RuneRunnerPrices.user_id = 2',$connection); w $user2=mysql_fetch_array($users2); w print ('trtd' . $item[1] . '/tdtdimg w src=module/runescape/Runerunner/' . $user1[1] . '.gif' . $user1[2]. w 'brimg src=module/runescape/Runerunner/' . $user2[1] . '.gif' . w $user2[2]. '/tdtd' . $item[2] . '/td/tr'); w }; w //this function is called by another w function picscreate($Rune,$username,$num){ w print('img src=module/runescape/Runerunner/' . $Rune . '.gif' . $username w . 'br'); w ${'' . $num . ''}=$Rune; w }; w //gets data form database and sends it to pics() w Function picspprep($usernum,$connection){ w $pict=mysql_query('SELECT username,rune FROM RuneRunner WHERE User_ID = w $usernum',$connection); w $pic=mysql_fetch_array($pict); w picscreate($pic[1],$pic[2],$usernum); w }; ? w iubWelcome to the RuneRunners Runescape service page/b/u/ibr w iThe currrent Runerunners are:br w !--begin Database Data-- w ?php w picspprep(1,$connection); w picspprep(2,$connection); ? w !--end Database Data-- w hr w To order a service, click on the running rune below that matches the one on w the player you want to buy from above w /i w table cellspacing=2 cellpadding=2 border=1 w tr w tdService/td w tdPrices/td w tdRequired Items/td w /tr w !--loop database data to create table-- w ?php w $id=1; w while($id=296){ w tablecreate($id,$connection); w $id=$id+1; w }; ? w !-- end loop -- w /table -- Best regards, Mikhail U. Petrov mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] access denied
i get this error: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\runescape\runerunner\s ervices.php on line 3 and the code up to line 3 is: ?php //Database Querys $connection=Mysql_connect($dbHost , $dbName , $dbPassword); i have included this in another script that sets $dbHost, $dbName and, $dbPassword to the correct things to connect to the db -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: access denied
oh... one request, no replying to sender Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i get this error: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\runescape\runerunner\s ervices.php on line 3 and the code up to line 3 is: ?php //Database Querys $connection=Mysql_connect($dbHost , $dbName , $dbPassword); i have included this in another script that sets $dbHost, $dbName and, $dbPassword to the correct things to connect to the db -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] access denied
I did set the veriables just in another script that includes this swcript Mikhail U. Petrov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! I think you not set this variables. Try to read your full errorlog but not only one part. Saturday, June 26, 2004, 7:37:36 PM, water_foul wrote: w i get this error: w Warning: Access denied for user: '[EMAIL PROTECTED]' (Using w password: YES) in w C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\runescape\runerunner\s w ervices.php on line 3 w and the code up to line 3 is: w ?php w //Database Querys w $connection=Mysql_connect($dbHost , $dbName , $dbPassword); w w i have included this in another script that sets $dbHost, $dbName and, w $dbPassword to the correct things to connect to the db -- Best regards, Mikhail U. Petrov mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] problem....
why doesn't this work: $pic=mysql_query('SELECT Rune, username FROM RuneRunner RuneRunner_1 WHERE (User_ID = 3)',$connection); $pic=mysql_fetch_array($pic); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] problem....
I tried that it didn't work Cole S. Ashcraft [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just from looking at it, it seems to be because you are redefining a variable, which destroys it, then calling for a mysql resource that has been destroyed. What is the error? I can't gaurantee that that is what is happening. Cole why doesn't this work: $pic=mysql_query('SELECT Rune, username FROM RuneRunner RuneRunner_1 WHERE (User_ID = 3)',$connection); $pic=mysql_fetch_array($pic); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] problem....
I checked em all they were right Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sounds like it doesn't like your SQL statement. Perhaps a field or table name is incorrect? Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ... Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What error are you getting? why doesn't this work: $pic=mysql_query('SELECT Rune, username FROM RuneRunner RuneRunner_1 WHERE (User_ID = 3)',$connection); $pic=mysql_fetch_array($pic); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] problem....
i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is there a icq chatroom for php?) Shahmat Bin Dahlan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Your SQL statement: 'SELECT Rune, username FROM RuneRunner RuneRunner_1 WHERE (User_ID = 3)' What is RuneRunner and RuneRunner_1? Are these two different tables. If it is, you might want to separate them with a comma. Why not try getting rid of the brackets surrounding User_ID=3? And also wrap single quotes around the digit 3. - Original Message - From: water_foul [EMAIL PROTECTED] Date: Wednesday, June 23, 2004 8:58 am Subject: Re: [PHP-DB] problem I checked em all they were right Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sounds like it doesn't like your SQL statement. Perhaps a field or table name is incorrect? Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ... Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What error are you getting? why doesn't this work: $pic=mysql_query('SELECT Rune, username FROM RuneRunner RuneRunner_1 WHERE (User_ID = 3)',$connection); $pic=mysql_fetch_array($pic); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Hi I am new
I am new to databases and php and I was wondering if any one would point me to a good guide anything would help :) thanks in advance, water_foul -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php