473,769 Members | 5,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to fix: "Warning: mysql_fetch_ass oc(): supplied argument is not a valid . . "?

wilsonh
6 New Member
Hi

I am aware that this is a common problem as I have scoured the internet endlessly looking for a solution.

The script was installed and set up for me because I am a complete beginner so unfortunately I have made little sense of some of the solutions that have been posted.

I have looked into it and now have some understanding of what the code should be doing or what it is trying to do.


The error is

"Warning: mysql_fetch_ass oc(): supplied argument is not a valid MySQL result resource in /path/to/file/index.php on line 213"

Line 213 is....

Expand|Select|Wrap|Line Numbers
  1. while($row = mysql_fetch_assoc($rs)) {
  2.  
This is strange because this script originally worked absolutely fine until I tried uploading a new design for the index page (with the original php code re-inserted).
I have even uploaded the original files (but left the db intact) and the error still occurs.

I spoke to a friend of mine and he mentioned something about the variable being returned as false and I need to perform some type of operation on the database maybe.

Do you have any suggestions on what I need to do?

This is the code that connects to the db...

Expand|Select|Wrap|Line Numbers
  1. $conn = mysql_connect($hostname,$username,$password) or die("Having problem connecting to database");
  2.     mysql_select_db($dbname,$conn);
I can also provide the full code by request.

Thanks in advance

Will
Dec 1 '10
10 3118
wilsonh
6 New Member
Ok thanks for that!
I'll have a scour around and see if I can find anything!
Dec 2 '10 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

6
4674
by: aa | last post by:
I use the following fragment of code to output datf from MySQL: ====================================================== $chan = mysql_connect ($db_host, $username, $password); mysql_select_db ($DB_name, $chan); $resultid = mysql_query ("select name_ru, description_ru, retail, dealer from lasershot WHERE le='1'", $chan); ........ ======================================================
4
7836
by: Ryanlawrence1 | last post by:
Heya, I get these 2 errors: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/themepar/public_html/changepass.php on line 20 You have not entered all the fields Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/themepar/public_html/changepass.php on line 34 Sorry You failed to enter the correct old password I was wondering if anyone could help me, I have...
2
16932
by: techjohnny | last post by:
Error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/jplane/certcent/phpweb/quiz/index.php on line 20 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/jplane/certcent/phpweb/quiz/index.php on line 21 PHP CODE:
11
3608
by: Breana | last post by:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/breana/public_html/category.php on line 88 ------------------------------------------- It does this when there is no result "empty table" how can i do a quick fix to say No Results... row 88: if ($myrow = mysql_fetch_array($result)) { do { if ($rowcolor == 1) {
6
2019
by: Tinker | last post by:
hi i am having a problem i can figure out can some one please tell me how to fix this PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hermes/ i took out the names here showed my log in info /htdocs/includes/sql_layer.php on line 237
4
1735
by: simon2x1 | last post by:
how can i fix these error and what does it mean Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\test_php\log\search\result.php on line 8 <?php @mysql_connect('localhost','user2','point')or die('could not connect'); @mysql_select_db('files') or die('could not select database');
2
2200
by: perhapscwk | last post by:
When I run my site from localhost, no error, but when I move it to webhosting, it show below error, why? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/asi50080/public_html/onlineadv/category.php on line 143 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/asi50080/public_html/onlineadv/category.php on line 155
0
5626
Atli
by: Atli | last post by:
What to discuss: What is a "MySQL resource". What causes the error. How to fix it. Common Newbie Pitfalls This article is the second installment in a series of (hopefully) many, following Markus' first installment: 1: Headers Already Sent.
1
1934
by: kmacc | last post by:
Hi, I'm getting this error on a page after changing server host, the error did not happen on my old host. I'm thinking it is to do with a new MySQL version and more strict coding. Can anyone help? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/propview.php on line 78 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in...
0
10222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10050
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.