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);
$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

Hyperlink is adding an extra gap to variable
Hi, here's my problem..

I have a php generated page with a hyperlink which opens in a new win

HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
I need t

question about n
I was looking at some of the things you could do with php and one of the things I have tried is n.<

Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing

MySQL noob question
hi guys

I have a simple mysql table set up, along the lines of

Col 1 - Col 2 - Date_l

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Problem with creating FI documents
Hi, Experts!

when i create Fi doc. with standart transaction, i ve been had such problem

change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I

Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

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