![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Programmer
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0
![]() |
SELECT statement
Hey guys I have been working on getting my selct statement to work for some time now and just can not get it to work I did manage to get it to stop returning errors but now it returns a blank page, so i went in to my DBMS and opend up the table double checked that i have every thing spelled the same as it is in there. I would be greatful if you could look at the code for me.
Quote:
__________________
Good better best, never let it rest, untill your good is better and your better is the best. |
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: SELECT statement
Kelvoron, how long have you been around, now? Not long enough to distinguish the differnce between code tags and quote tags? If you don't have two brain cells, try to rent one or two.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Re: SELECT statement
$tabLE_name and $table_name aren't the same thing. Make sure you have php error display enabled.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0
![]() |
Re: SELECT statement
Oh my bad i changed it. it still does not work thoug thanks for cathing that for me Dameon. I checked my code against othr peoples and bought a MySQL book the code looks corect as far as i can see but i still get no return
i changed echo(results); to echo $results now it displays " Resource id #2 " X|
__________________
Good better best, never let it rest, untill your good is better and your better is the best. Last edited by Kelvoron; Nov 26th, 2007 at 6:34 PM. |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: SELECT statement
Check your book regarding what "resource" means. As an example, a FILE * in C does not represent the contents of a file. It is merely an access mechanism.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Re: SELECT statement
Any basic example of the PHP MySQL functions will show you what to do with your $result variable. You certainly don't try to convert it to a string and display it. Reread your book and the online documentation before simply asking around for the next line -- both contain working examples that you can build from with a little personal effort.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#7 |
|
Programming Guru
![]() ![]() ![]() |
Re: SELECT statement
Look into the mysql_fetch_row() function, passing in your $result variable as the parameter.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#8 |
|
Newbie
Join Date: Oct 2007
Posts: 12
Rep Power: 0
![]() |
Re: SELECT statement
The Variable names are case sensitive in PHP. See the variable you have used for table name.
Sanjay Aggarwal |
|
|
|
|
|
#9 |
|
Expert Programmer
|
Re: SELECT statement
|
|
|
|
|
|
#10 | |
|
Hobbyist Programmer
Join Date: Nov 2006
Location: 163H
Posts: 213
Rep Power: 2
![]() |
Re: SELECT statement
Quote:
Just a thought, though.
__________________
You never test the depth of a river with both feet. The believer is happy. The doubter is wise. Free speech carries with it some freedom to listen. The next generation will always surpass the previous one. It`s one of the never ending cycles of life. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SQL Select Statement Performance | King | Other Scripting Languages | 6 | Dec 1st, 2006 5:12 PM |
| Allow user to select a directory | MegaArcon | HTML / XHTML / CSS | 11 | Jun 5th, 2006 8:38 AM |
| reloading html select boxs...is there a better way? | MegaArcon | Python | 13 | May 26th, 2006 3:06 AM |
| sockets, problem with select() | Wizard1988 | C++ | 0 | Jan 15th, 2006 4:09 PM |
| Trouble with a swith statement | cjaime | C | 10 | Nov 8th, 2005 11:09 AM |