WHYISNT THIS MYSQL STATEMNT NOT WORKING? (php)


Posted on 16th Feb 2014 07:03 pm by admin

caps because its absolutely rediculous.
i dontunderstand why its not working. there is a column called id and a collumn called to
then there is also. two rows with the field for `to` equal to the number: 1
still doesnt work:
Did you know?Explore Trending and Topic pages for more stories like this.
just outputs . this user has no commnets, none. (every single time)

Code: <?php $testlll = mysql_query("SELECT to FROM cmnts WHERE to = 1");
if(!$testlll){echo "this user has no comments, none.";} else{echo "this user has $testlll comments";} echo $testlll; ?>
and of course $testlll (which i renamed trying to fix it -from $test) is equal to, well. NOTHING!!! whats going on here? do i have to change a table name or something?
i didnt try that because i would have to redo the whole table. theres only one column called to and one column called id (so no dupes)
also im not dumb it used to be $testlll = mysql_num_rows(mysql_query thing but that didnt work either
No comments posted yet

Your Answer:

Login to answer
172 Like 10 Dislike
Previous forums Next forums
Other forums

Thought I has this figured out especially after all the help i received?
Cags, Salathe, Daniel helped me with this yesterday, but not sure i took it all in.
I am attempti

Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag

Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any do

Scene graph using Direct3D?
There are several C++ scene graph based packages available for OpenGl, like say OSG,

http://w

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash