Jump to content

Need help with mysql_info()


ac1982

Recommended Posts

Hi I ll like some help with the following.

 

$con = mysql_connect("localhost", "root" , "");

mysql_select_db("dabasename", $con);

mysql_query("SELECT * FROM type");

 

$t = mysql_info();

echo $t;

 

I tried the above code but I cannot see any information when I echo mysql_info();

Can you please tell  me what am i doing wrong.

Thank you

Link to comment
https://forums.phpfreaks.com/topic/127393-need-help-with-mysql_info/
Share on other sites

From the mysql_info section of the php manual -

 

Return Values

Returns information about the statement on success, or FALSE on failure. See the example below for which statements provide information, and what the returned value may look like. Statements that are not listed will return FALSE.

 

Examples

 

Example 1455. Relevant MySQL Statements

 

Statements that return string values. The numbers are only for illustrating purpose; their values will correspond to the query.

 

 

INSERT INTO ... SELECT ...

String format: Records: 23 Duplicates: 0 Warnings: 0

INSERT INTO ... VALUES (...),(...),(...)...

String format: Records: 37 Duplicates: 0 Warnings: 0

LOAD DATA INFILE ...

String format: Records: 42 Deleted: 0 Skipped: 0 Warnings: 0

ALTER TABLE

String format: Records: 60 Duplicates: 0 Warnings: 0

UPDATE

String format: Rows matched: 65 Changed: 65 Warnings: 0

 

A SELECT query is not among that list and would cause the mysql_info() statement to return a false value.

 

Please read the php manual section for any function you are attempting to use, especially when it does not work or when ti produces and error.

 

 

Archived

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

×
×
  • Create New...

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.