473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Wht does this error mean ?

i keep getting these type of messages how do i fix them ?
mysql_num_rows() is not a my sql function
mysql_num_array() is not a my sql function


Please help .
Sep 15 '07 #1
5 2782
bartonc
6,596 Expert 4TB
i keep getting these type of messages how do i fix them ?
mysql_num_rows() is not a my sql function
mysql_num_array() is not a my sql function


Please help .
Since that doesn't look like an error that MySql would output, you'll need to tell us what programming language that you are using and what means you have of connecting to the database.

If the IS an error cause by a SQL query, then perhaps you will have better luck by posting in the MySQL Forum.
Sep 15 '07 #2
pbmods
5,821 Expert 4TB
Heya, Rathour. Welcome to TSDN!

Is PHP complaining about a 'Call to undefined function mysql_num_rows()'?
Sep 15 '07 #3
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\Alam_project\login.php on line 6


This is the error i get with this file :::::::
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. session_start();
  3. $con=mysql_connect("localhost","root","");
  4. $db=mysql_select_db("alam1",$con);
  5. $rs=mysql_query("select userid,password from newuser where userid='".$_POST["txtuid"]."' and password='".$_POST["txtpass"]."'");
  6. if(mysql_num_rows($rs)<=0)
  7.  
  8. {
  9. $_SESSION["msg"]="<b><font color=red>Invallid Userid or Password</font></b>";
  10. }
  11. else
  12. {
  13. unset($_SESSION["msg"]);
  14. $rows=mysql_fetch_array($rs);
  15. $id=$rows["userid"];
  16. //header("Location:user_profile_signin.php?id=".$id);
  17. }
  18. ?>
  19. <!--/*$query="SELECT detail, inrepret from menu";
  20. $result=mysql_query($query); 
  21. $num_results=mysql_num_rows($result); 
  22. for ($c=0;$c<$num_results;$c++)
  23. {
  24. $relevancy=0;
  25. $row=mysql_fetch_object($result);
  26. $mypage=$row->number;
  27. $mycontent=strtolower(strip_tags($row->article)); 
  28. for ($d=0; $d<$q_num; $d++)
  29. {*/-->
  30.  
tell me wht needs to be fixed here ?
Sep 17 '07 #4
pbmods
5,821 Expert 4TB
Heya, Rathour.

First thing I fixed for you:
Please use CODE tags when posting source code:

[CODE=php]
PHP code goes here.
[/CODE]

Now then, you're likely getting this error because your MySQL query is generating an error. Try adding this line after your mysql_query():
Expand|Select|Wrap|Line Numbers
  1. echo mysql_error();
  2.  
Sep 17 '07 #5
epots9
1,351 Expert 1GB
you error is in this line
[php]
$rs=mysql_query("select userid,password from newuser where userid='".$_POST["txtuid"]."' and password='".$_POST["txtpass"]."'");
[/php]

since userid would be a number you don't enclose it with single quotes as if it were a string (varchar). so it would be like:

[php]
$rs=mysql_query("select userid,password from newuser where userid=".$_POST["txtuid"]." and password='".$_POST["txtpass"]."';");
[/php]

now it should run fine.
Sep 17 '07 #6

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

Similar topics

15
by: lkrubner | last post by:
I want to give users the power to edit files from an easy interface, so I create a form and a PHP script called "fileUpdate". It does a reasonable about of error checking and prints out some...
6
by: WindAndWaves | last post by:
Hi Folks I have inhereted a script that I understand reasonably well, I just do not understand !/^\d+$/.test(el.value) what the hell does that mean? Below is the script (there are really...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
4
by: geodev | last post by:
I have developed a small application using ASP.NET and VB.NET on my development machine it works great. When I copy across the files manually to my test machine and create a Virtual Directory all...
1
by: John Ramsden | last post by:
I have ported a PHP MySQL app to PostgreSQL, and a pg_send_query() call is returning error code 2 (PGSQL_TUPLES_OK). Unfortunately the PHP manual lists the error codes but doesn't indicate what...
15
by: Pucca | last post by:
I'm getting an error when I tried to use this BerConverter class in my C# code. Even though the Interent doc says that it runs on Win2000 sp4, I just thgouth I'll double check. Does anyone know...
13
by: Protoman | last post by:
I'm getting an error: 10 C:\Dev-Cpp\Enigma.cpp no match for 'operator<' in 'i < (+cleartext)->std::basic_string<_CharT, _Traits, _Alloc>::end ()' Code: Enigma.hpp...
5
by: prabu | last post by:
Hi all, I want to know, what does the value of the array in the following statement mean and How to print the content of the array SMB_Negotiate using printf? unsigned char SMB_Negotiate = ...
4
by: liyanage | last post by:
I recently worked on error handling and three related issues/questions came up. 1.) I am trying to trigger Apache ErrorDocument handlers by setting appropriate HTTP status codes in my PHP...
6
by: Bint | last post by:
I'm getting this returned from a PHP script. What does this mean? <b>Parse error</b>: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in <b>/ho Thanks B
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.