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

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Google voice
I currently have a form in html, but I want it in php so the information is not in the source code.<

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Problem Dereferencing
With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,

Accept only alpha characters
I've got this bit of code ready for accepting a phrase:

Code: if (!eregi ("", $_POS

Windows 7
Windows 7 default user account control worries experts. Corporate IT departments should be pleased w

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

add 20 000 to the rowcnt
Hi ...
I need to add 20 000 to the row count but just cant find a way to do this i am new to php

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