Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Having problem in sql.........need help.
Old 01-29-2010, 01:01 AM Having problem in sql.........need help.
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Hi,

I am having problem with getting data from database.........I need your expert suggestions.....

here's the code:

PHP Code:
<?
          $sql_sub
="select * from tblsubcate order by subcategory asc";
          
$result_sub=mysql_query($sql_sub);
          while(
$row_sub=mysql_fetch_array($result_sub))
          {
          
?>
When I run this..................an error occur
"mysql_fetch_array(): supplied argument is not a valid MySQL result resource in"

I am sure i mistook somewhere......please help....

your help would be highly appreciated.

Thanks.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-29-2010, 02:46 AM Re: Having problem in sql.........need help.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Your query looks ok.
Try to display the error, if there was one:
PHP Code:
$sql_sub="select * from tblsubcate order by subcategory asc";
$result_sub=mysql_query($sql_sub);
if(!
$result_sub){
  echo 
mysql_error();
  die();

__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 01-29-2010 at 02:49 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-29-2010, 03:47 AM Re: Having problem in sql.........need help.
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Thanks tripy...............I'll try and let you know....soon.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Having problem in sql.........need help.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15612 seconds with 12 queries