![]() |
:) NEed help - 2 Questions MYSQL
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 PHP Code:
HTML Code:
where number=" .$_GET['id'] ***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: |
I think you need to have your WHERE clause before your ORDER BY clause.
|
Lynne is correct. Your clauses are out of order. In addition, I would add that the query you provided is extremely vulnerable to SQL injection attacks--and DB errors if an ID isn't passed. You should consider using vbulletin's internal functions for fetching passed parameters. Example:
PHP Code:
|
thanks and please one more question
how to make ex. " file.php?cat=1?thread=5 " double id's!!! |
Quote:
As to getting those variables, here is a link the vBulletin manual that explains using vBulletin's built in functions for accessing $_GET, $_POST, and $_REQUEST: http://www.vbulletin.com/docs/html/codestandards_gpc Note that in the example code, the code highlighted in red is the undesirable method. |
All times are GMT. The time now is 09:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|