mysql UNION | warning mysql_fetch_array !!


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

Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `division`='$f_usr_div' ORDER BY `pname` UNION SELECT `stock_close` FROM `stockiest_entry` WHERE `user_id`='$user_id' AND `stockiest_id`='$stckst_id' AND `month`='$f_month' AND `user_div`='$title_div' AND `fiscal_year`='$st_year'";
$result1=mysql_query($query1);
Did you know?Explore Trending and Topic pages for more stories like this.
$i=0;
while($a_row=mysql_fetch_array($result1)) // line 89
{
global $i;
$i++;
$db_id=$a_row['id'];
$db_pname=$a_row['pname'];
$db_pcode=$a_row['pcode'];
$db_packing=$a_row['packing'];
$db_type=$a_row['ptype'];
$db_unit=$a_row['unit'];
$db_stock_close=$a_row['stock_close'];

print "$db_id, $db_pname, $db_pcode , $db_packing, $db_type, $db_unit, $db_stock_close";



i got error.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /domains/55373/web/ipharma/form_header_final.php on line 89
No comments posted yet

Your Answer:

Login to answer
129 Like 28 Dislike
Previous forums Next forums
Other forums

Rand() help needed
Hi all,

Can someone explain and give me a quick example of how I would go about this?

TimeStamp Column Problem...
I'm mad at my self and thinking I'm a little retarded. It just be some one mistake I'm missing here.

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

how make 2 column in table with data tybe long row
hi every one

I want make in my table 2 column with data tybe long raw

how thi

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

Am I setting up my sites oldschool?
Ok,

When I create a site I open a basic template that I have created that consists of a css f

VAT
how should I deal with VAT?

if I have a product that costs £5.00 and VAT @ 17.5% (£0.87

RFQ Configuration - can you make PLANT field an optional field in ME42
Is there a way to make the plant field on an RFQ optional in change mode (ME42)?

want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea o

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

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