PDA

View Full Version : Any PHP/MySQL experts here?


easy
10th February 2006, 09:50
$}!.(GET_VARS){ Aaaaaaaaa

What does it all mean?

I'm trying to get a simple PHP database driven site to work and it's driving me bonkers. Can anybody save me from the bottle?

PM me for site details if you can help.

mattk
10th February 2006, 10:55
Is the Aaaaaaaaa part of the code?

Ravenfire
10th February 2006, 10:58
Thats a strange error, VARS means variable I think. Is that the whole error message?

vigo
10th February 2006, 11:00
This could be tricky, I'll do my best to help you.

You have PM :)

easy
10th February 2006, 11:25
:oops: :oops: Sorry - that wasn't the error message, just me swearing in PHP language.

The actual error is:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in blahblah.php on line 262

Line 262 is:

<? $i=0;
while ($rs = mysql_fetch_array($rs_query)){
?>

I don't want to post the site details because I know search engines pick up these posts.

Thanks vigo - I'll check my PMs now.

vigo
10th February 2006, 11:27
It looks like the database query isn't being made properly.

webit
10th February 2006, 11:30
put the following into the code and you'll see what the query is:

echo "rs_query: ".$rs_query;

crus
10th February 2006, 12:23
Yep problem with the result set.

could be

1. db is not there, so PHP does not have a result set to wotk with.

2. connection to db has been refused again no result set to work with.

3. the sql query has been formed wrong so no results set to work with.

4. the query has worked fine but the result set is names something else.

eg results are in $mysqlQueryRES and you are trying to access them from $mylsqQuerySomethingElse.

Personally I would echo the SQL out as instructed above then paste stright into phpMyAdmin or whichever db admin you run and see if you get results. If you do then the SQL is sound and its one of the other problems.

D

easy
10th February 2006, 18:33
Many thanks for all your replies.

The problem was sorted by Creospace after a lot of hard work, so a big thank you to Gary. He certainly knows his stuff.