473,387 Members | 1,891 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,387 software developers and data experts.

fetching record then result is query was empty

hi,

i have fetching record from mysql database in this formate

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $connsqlhostname = "localhost";
  3. $connbase = "rajgorsamaj";
  4. $connlogin = "pushpa";
  5. $connpassword = "123456";
  6. $db_connect = mysql_connect($connsqlhostname,$connlogin,$connpassword) or die ("<B>Error ".mysql_errno()." :</B> ".mysql_error()."");
  7.  
  8. $query="select id,surname from dataentry";
  9. $rs=mysql_query($qyery) or die(mysql_error());
  10. while($dataentry=mysql_fetch_array($rs))
  11. {  
  12.     $i++;
  13.     echo "<tr>";
  14.     echo "<td align=center><h1><center>".$i."</center></h1></td>";
  15.     echo "<td align=center><h1><center>".$dataentry[0]."</center></h1></td>";
  16.     echo "<td align=center><h1><center>".$dataentry[1]."</center></h1></td>";
  17. }
  18. ?> 
  19.  
so why result page is display query was empty

please reply me
Jun 13 '07 #1
2 2846
r035198x
13,262 8TB
hi,

i have fetching record from mysql database in this formate


<?php
$connsqlhostname = "localhost";
$connbase = "rajgorsamaj";
$connlogin = "pushpa";
$connpassword = "123456";
$db_connect = mysql_connect($connsqlhostname,$connlogin,$connpas sword) or die ("<B>Error ".mysql_errno()." :</B> ".mysql_error()."");

$query="select id,surname from dataentry";
$rs=mysql_query($qyery) or die(mysql_error());
while($dataentry=mysql_fetch_array($rs))
{
$i++;
echo "<tr>";
echo "<td align=center><h1><center>".$i."</center></h1></td>";
echo "<td align=center><h1><center>".$dataentry[0]."</center></h1></td>";
echo "<td align=center><h1><center>".$dataentry[1]."</center></h1></td>";
}


?>





so why result page is display query was empty



please reply me
Are there any values in the table?
Jun 13 '07 #2
Motoma
3,237 Expert 2GB
Take a look at these instructions about enabling runtime error messages on pages. Post back once you have an error message to give us.
Jun 13 '07 #3

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

Similar topics

5
by: Bob | last post by:
Hi, I am using Access 2000 to print out an address book. I have designed the report based on a database whose first record is not blank. In the design there is a one line report header, a onle...
3
by: Daves | last post by:
trying to get a boolean value from DataReader (that is, result from a SQL query); boolean MyBool = MyDataReader.GetBoolean(3); well it works using that number 3 but of course I would like to...
0
by: Shujun Huang | last post by:
Hi, I am working on converting Informix database to Postgre. I have one question for fetching records using PostgreSQL. The record I am fetching is a variable size text string. Before fetching...
1
by: nasirmajor | last post by:
Dear All, im fetching record from database using datareader, and is displaying them in the textboxes. when user change the text fields and then presses the update button the record should be...
22
by: Sandman | last post by:
So, I have this content management system I've developed myself. The system has a solid community part where members can register and then participate in forums, write weblogs and a ton of other...
1
by: Bill F | last post by:
I am trying to check for '$date' & '$mileage' but when I give them a value that is not in the table $result = 2 & the 'if' statement fails to create the new record, or just print "create DMID" in...
5
by: Stephen | last post by:
Hello, I have 2 tables, one contains log of all incoming phone calls, and the other one is simply a phone book. I want to fetch caller's name if it's already exist in the phone book, and if it...
0
debasisdas
by: debasisdas | last post by:
We can fetch from a cursor into one or more collections: DECLARE TYPE NameList IS TABLE OF employees.last_name%TYPE; TYPE SalList IS TABLE OF employees.salary%TYPE; CURSOR c1 IS SELECT...
1
by: padmaneha | last post by:
I executed the below query for getting the details of dishes which are tagged to the festival 'Durga Pooja' select fg.tagname, fg.foodid, f.dishes, f.dishtype from foodtag fg inner join food f ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.