Help with simple query


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc contains. Can anyone see what's wrong with this:

Did you know?Explore Trending and Topic pages for more stories like this.
Code: $tc = @mysql_num_rows(mysql_query("(SELECT * FROM tbl1 WHERE id = $id) UNION (SELECT * FROM tbl2 WHERE id = $id)"));
print $tc;
No comments posted yet

Your Answer:

Login to answer
296 Like 9 Dislike
Previous forums Next forums
Other forums

array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p

Odd or Even
Inside of a while loop I need to echo several rows of info...easy enough.

In the loop (for th

Code working in IE but not FireFox
I created a dynamic navigation list for my website based off of a table in my database. The code is

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill t

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

Cursor statement failed with errors
Following statement failed with the errors.

cursor proj_cursor1 is (select projectID from

creating a 1 to 100 in a table
hi guys I am a newb in php need some help.

I have a table with 1 column and 100 rows and in

Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).
I keep getting the

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash