Re: Resource ID# 5 and Resource id #5 8561 errors....help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 12, 2008 at 16:54, Terion Miller <webdev.terion@xxxxxxxxx> wrote:
>
> $query = "SELECT * FROM importimages WHERE Category='Obits' ";
> $result = mysql_query ($query);
>
> $arr = mysql_fetch_row($result);
> $result2 = $arr[0];
> echo ($result2);

    Try this to get yourself started:

<?php
$sql = "SELECT * FROM `importimages` WHERE `Category` = 'Obits'";
$result = mysql_query($sql) or die("Error in ".__FILE__.":".__LINE__."
- ".mysql_error());
while($row = mysql_fetch_array($result)) {
    foreach($row as $k => $v) {
        echo stripslashes($k).": ".stripslashes($v)."<br />\n";
    }
}
?>

    NOTE: You shouldn't need stripslashes(), but it's put there just
for backwards-compatibility in case you're on an older (or
poorly-configured) installation.

-- 
</Daniel P. Brown>
http://www.parasane.net/
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
50% Off Hosting! http://www.pilotpig.net/specials.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux