The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
:) 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: |
#2
|
||||
|
||||
I think you need to have your WHERE clause before your ORDER BY clause.
|
#3
|
|||
|
|||
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:
|
#4
|
||||
|
||||
thanks and please one more question
how to make ex. " file.php?cat=1?thread=5 " double id's!!! |
#5
|
|||
|
|||
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. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|