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

Tree Menu
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowin

confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

why this query can delete duplicates ?
why this query can delete duplicates ? Anybody can give me the detailed explanation ?

Tha

controlling/creating accounts with privileges
hi all,
i'm trying to figure out how i can create/control account with privileges, for instance a

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:

Code: header("Cache-Cont

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

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

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