| | |
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
0
#1 Sep 3rd, 2008
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/fellowes/public_html/createaccount.php on line 108
PHP Syntax (Toggle Plain Text)
include("conf.inc.php"); $tbl_name="tbl_courses"; $sql=mysql_query("SELECT * FROM $tbl_name WHERE crs_semister=1 AND crs_period='A'") or die(mysql_error()); $result=mysql_num_rows($sql);
PHP Syntax (Toggle Plain Text)
<?php while($rows=mysql_fetch_array($result)) { ?> <option><?php echo $rows['crs_code']; ?>//Line 108</option> <?php } ?>
im a zombie killer
Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resou
1
#2 Sep 3rd, 2008
Replace the $result in this one:
to $sql because your $sql variable is what holds your query.
$result holds the mysql_num_rows value.
•
•
•
•
PHP Syntax (Toggle Plain Text)
<?php while($rows=mysql_fetch_array($result)) { ?> <option><?php echo $rows['crs_code']; ?>//Line 108</option> <?php } ?>
$result holds the mysql_num_rows value.
Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
0
#3 Sep 4th, 2008
Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
0
#4 Sep 4th, 2008
Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
0
#5 Sep 4th, 2008
![]() |
Similar Threads
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result (PHP)
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource (PHP)
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource (PHP)
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource (MySQL)
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource (PHP)
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource (PHP)
Other Threads in the PHP Forum
- Previous Thread: Fatal error: Call to undefined function form()
- Next Thread: Images in PHP
Views: 819 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl customizableitems database date development directory display download dynamic echo email error file files folder form forms forum function functions google headmethod href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail malfunctioning menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





