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:

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

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

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

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