Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-01-07, 03:36 AM
Junior Member
 
Join Date: Jan 2007
Posts: 1
frozenboy87 is on a distinguished road
Default mysql help

hi, here is my code... i think something is wrong with it... please help me identify wat's the problem thanks

<?php // process information in body.
// Retrieve information in the head section
$query="SELECT * from imageTable";
$result = mysql_query($query) or die ("Error opening imageTable");
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
} else {
echo "Number of rows: ".mysql_num_rows($result).;
echo "Number of fields:".mysql_num_fields($result).;
}
while($row = mysql_fetch_assoc($result))
{
echo $row;
foreach($row as "$key" >= "$value")
{
echo "$value";
}
}
mysql_free_result($result);
?>
===================================
output
===================================
= "$value") { echo "$value"; } } mysql_free_result($result); ?>
===================================

this happen after the ">"sign.. is the syntax wrong or wat???
please answer asap thanks
Reply With Quote
  #2 (permalink)  
Old 2007-01-07, 06:02 AM
Senior Member
 
Join Date: Jul 2006
Location: Prague, Czech Republic
Posts: 193
vladimir_cz is on a distinguished road
Send a message via ICQ to vladimir_cz Send a message via MSN to vladimir_cz Send a message via Yahoo to vladimir_cz Send a message via Skype™ to vladimir_cz
Default

replace
PHP Code:
foreach($row as "$key" >= "$value"
with
PHP Code:
foreach($row as "$key" => "$value"
__________________
Thank you. Vladimir, Czech Republic.
http://www.smartwebco.com/
I'm looking for job.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:27 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.