Re: [PHP] MySql query
Try: SELECT gallery_name, image_id, image_name FROM galleries, Images WHERE galleries.gallery_id = images.gallery_id At 07:57 AM 4/19/2002 -0700, you wrote: Ok this could be the wrong place to ask this but there seems to be some people in here that know mysql quite well. My question is this; I have a database that looks like this. galleries gallery_id gallery_name snip Images image_id gallery_id image_name etc snip I am trying to run a SQL query that will return an array of rows from the images table. But I want the gallery_id number to be replaced with the actual gallery name from the galleries table. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SELECT + PARSE ERROR
At 02:23 PM 4/8/2002 +0200, you wrote: Hy, I try to do a SELECT but when I test my code I Have a parse error. If someone can explain to me why. Code: $db = mysql_connect(newsmanga_db); $req = SELECT * FROM dvds WHERE nomdvd='.$nom..$i' ; /// PARSE ERROR IN THIS LINE Your missing a '.' after the $i . -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parsing error
Is it just me or is the for statement missing a begining curly bracket? -Chris At 11:29 AM 4/1/2002 -0600, you wrote: which line is 45 -Original Message- From: news.php.net [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] Parsing error Hi, I'm real new in php and trying to read a txt file this is my code : ?php $row = 1; $fp = fopen (lecteurs.txt,r); while ($data = fgetcsv ($fp, 1000, ;)) { $num = count ($data); $row++; for ($c=0; $c$num; $c++) switch ($row) { case 1 : { $vignette = $data[$c]; } case 2 : { $photo= $data[$c]; } case 3 : { $marque= $data[$c]; } case 4 : { $nom = $data[$c]; } case 5 : { $pdfproduit= $data[$c]; } case 6 : { $commprod = $data[$c]; } } fclose ($fp); echo $vignette; echo $photo; echo $marque; echo $nom; echo $pdfproduit; echo $commprod; ? and when i run it i get : Parse error: parse error in essai.php on line 45 here' my txt file (just 1 line for probe) petitimage;photo;marque;Nom;lepdf;commproduit Can someone help me to go thru TIA Hubert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form Problem
I'm having a problem with a HTML form. When it gets submitted, I keep getting an undefined variable error message. And a blank page (aside from a 'Hi' written on it...). I don't think its a problem with my install of PHP as other PHP code is running fine, but can't get it to print out this name. I'm probably missing something simple, but I just can't figure it out. Any help would be appreciated. the form: html head titleMy Form/title /head body form action=test2.php method=GET My name is: br input type=text name=YourName input type=submit name=submit value=Submit / /form /body /html Test2.php file: html head titleForm test.../title /head body Hi ?php echo $YourName; ? /body /html The url that is getting passed to the file: http://localhost/test2.php?YourName=Chrissubmit=Submit The error message I'm getting: [Wed Jan 09 14:24:47 2002] [error] [client 127.0.0.1] PHP Warning: Undefined variable: YourName in c:\program files\apache group\apache\htdocs\test2.php on line 10 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]