0
<?php
$mysql_host = "***";
$mysql_database = "***";
$mysql_user = "***";
$mysql_password = "***";
mysql_connect($mysql_host,$mysql_user,$mysql_password);
mysql_select_db($mysql_database);
$query = "SELECT * FROM people coming";
$result = mysql_query($query);
while($w=mysql_fetch_array($result)) {
echo $w['Name'];
}

 ?>

this doesnt work--Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
y?

3
Contributors
4
Replies
16
Views
4 Years
Discussion Span
Last Post by cmps
0
<?php
$mysql_host = "***";
$mysql_database = "***";
$mysql_user = "***";
$mysql_password = "***";
mysql_connect($mysql_host,$mysql_user,$mysql_password);
mysql_select_db($mysql_database);
$query = "SELECT * FROM people coming";
$result = mysql_query($query);
while($w=mysql_fetch_array($result)) {
echo $w['Name'];
}

 ?>

okay lets see ...
it's recommended that you don't insert spaces in the table names, but I think you can fix this by adding single quotation like this 'people coming', not sure. If this didn't fix the problem, then add this:
$result = mysql_query($query)** or die(mysql_error())**;
this will explane more what is your error :) good luck

0

try
.... or die( mysql_error())
it will tell u the problem

Edited by cmps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.