Log in

View Full Version : Questions.. Please help


kiril_cvetkov
04-07-2008, 04:13 PM
I have problems while coding vbulletin
Please help me.. i will be very happy if someone replay..

First question :
i get error when i put
$featured = $db->query_read("SELECT title2,picture2,catid2 FROM " . TABLE_PREFIX . "tabeladva order by views2 desc LIMIT 5 where number=" .$_GET['id']);

when i remove this where number=" .$_GET['id'] i don't have error anymore.. but i don't get the function that i want..
***How is possible to use order by and where together*****

Second question :

How i can count, how many rows have in one field

Please help me :erm:

Lynne
04-07-2008, 04:17 PM
Why are you posting this twice? :) NEed help - 2 Questions MYSQL (https://vborg.vbsupport.ru/showthread.php?t=175439)

kiril_cvetkov
04-07-2008, 04:52 PM
oh sorry my internet was down and i thought that the message wasn't sent

MoT3rror
04-07-2008, 08:55 PM
Limits have to come after where statements. Also this can easily lead to sql injection the way you got it.