Jump to content

[SOLVED] mysql_fetch_array(): supplied argument is not a valid MySQL result....


chris_2001

Recommended Posts

I have been looking at it for about 20mins and I must be missing something because I can't see what is wrong with it :/ Anyone know why the query is failing?

 

mysql_fetch_array(): supplied argument is not a valid MySQL result resource in test.php on line 12

 

<?php
include "config.php";

mysql_connect("$host", "$username", "$password");
mysql_select_db("$db_name");


$query = "SELECT OrderNum FROM ordernum";
$result = mysql_query($query);


$row = mysql_fetch_array($query, MYSQL_ASSOC);
$OrderNum = "row['OrderNum']";


?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.