Jump to content

[SOLVED] Query works, but no data returned!!


unxposed

Recommended Posts

Okay so can't get my head around this.

 

I have a query:

 

INSERT INTO pages (parent_id, layout_id, clean_url, title, description, keywords, live, language_id, navigation, weight , created, created_by, modified, modified_by) VALUES ('1', '1', '/boooo', 'booooooo', 'hello', '', '1', '3', '1', '0' , NOW(), 1, NOW(), 1)

 

It works okay and inserts a row, but if I use mysql_num_rows I don;t get any valuem it returns blank. Therefore when I use it here:

 

if (mysql_num_rows($result) >= 1) {
do this
} else {
do that
}

 

It always goes to else.

 

Also when I try and manually insert the query through phpmyadmin it inserts, but I don;t get the green bar returned saying it's been inserted and giving details of the query!? Weird, or am I just being stupid?

 

Help would be really appreciated.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/166062-solved-query-works-but-no-data-returned/
Share on other sites

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.