Jump to content

Archived

This topic is now archived and is closed to further replies.

jvrothjr

error msg please help

Recommended Posts

We will try this in this forum.

 

I have a database named [grouplog] with 2 tables {role & group}

I can query the role and get data back and printed to the screen

but can not get data back from group. Here is the simple code I am using

if any one can help please?

 

<table border=2 align=center><TD>Role</TD>

<?php

mysql_select_db (\"grouplog\");

$result = mysql_query (\"select role from role\");

while ($row=mysql_fetch_array($result)) {

Print (\"<tr>\");print (\"<td>\");print $row[role];print (\"</td>\");print (\"</tr>\");

}?>

</table>

 

<table border=2 align=center><TD>Group</TD>

<?php

mysql_select_db (\"grouplog\");

$result = mysql_query (\"select group from group\");

while ($row=mysql_fetch_array($result)) {

Print (\"<tr>\");print (\"<td>\");print $row[group];print (\"</td>\");print (\"</tr>\");

}?>

</table>

 

Here is the error msg I get

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:Program FilesAbyss Web Serverhtdocstestingtestgrp.php

Share this post


Link to post
Share on other sites

you can\'t use group as a table or field name. It is a reserved word and will not work right with queries. Try making a new table, tblgroup, with the field fldgroup and trying that.

Share this post


Link to post
Share on other sites

Thanks that was it. Was driving me crazy..........

changed it step 1 pasted now others thanks...

pasted another topic for the other one.

 

join multi tables from multi databases but all on one machine....

 

That is my next hump to get over .............

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.