Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display query

Status
Not open for further replies.

rrsub

MIS
Joined
Oct 23, 2002
Messages
536
Location
US
I have a simple query where there is only one answer.

$idx = mysql_query( "SELECT * FROM name_servers WHERE index like $dns1no");



$idx_result = mysql_result($idx,0,server);

echo $idx_result;

How can I display $idx_result?

$dns1no corresponds to an index field value from another table.

2 columns in name_servers are index and server

When $dns1no = the index, I want to see the value in the server column.
 
I'd first make sure that PHP understands that your use of the string "server" in your mysql_result() invocation is actually a string.

To do that, I'd place quotes around the word server.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top