[CS-FSLUG] Looking for tips

David M. dave at edificationweb.com
Fri Jul 2 11:43:13 CDT 2004


On Friday 02 July 2004 10:51 am, Steven Fricke wrote:
> Still got it wrong!
>
> I should never reply to emails with code the day before vacation!
>
> if ($datareturned > '') {
> echo "<table>
> bla bla bla
> </table>";
> }
>
> Actually, you can take it a little father with an else
>
> if ($datareturned > '') {
> echo "<table>
> bla bla bla
> </table>";
> } else {
> echo "There is no data\n";
> }
>
> I will be happy to send you the code for a page or two where I do this.

Thanks Steven, I'd appreciate it.

I was about to throw together a simple page to test my hand at this and I am 
slightly stuck and highly mad at myself for not coding in the past few months 
and now I have totally forgot how to use my sql statements.

I am very fusturated right now, cuz this once was a simple task, now turned 
into almost a complete headache.

I am so mad at myself right now. I cannot figure why this code keeps 
displaying "Resource Id #3" on the page instead of the contents of the field.

mysql_select_db('testing', $connect);
$myquery = "SELECT * FROM phpstore";
$result = mysql_query($myquery, $connect);
while ($row = mysql_fetch_row($result));
echo $result; 

I've even tried:
echo $row[1];
echo $row["1"];
echo $row[0];

Still I either get the output "Resource Id #3" or nothing at all instead of 
the desired contents of the "name" field.

I am very upset with this.
-- 
David M.




More information about the Christiansource mailing list