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

Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D

I'm

Date Format
Hi there,

I have a date format like this right now:
Sat, 17 Oct 2009 17:04:00

I ne

ALV List display - header width adjust
Hi,

I am using REUSE_ALV_LIST_DISPLAY for my ALV display.The width of the ALV varies for

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.


for ($i=0; $i<10

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Create comparison matrix?
I want to create a comparison script for forum software and was wondering is there any tutorial or b

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

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