![]() |
|
#1
|
|||
|
|||
Need help with SyntaxI am uncertain what I am doing wrong with this.
The 1st set of code does not work, but the second set of code works fine, the only difference is the 'where `ip` = xxxxxxx' in both pieces of code. PHP Code:
Please show me what I am doing wrong, and what to do to fix this. Thanks, Richard Last edited by admin : 07-Dec-2007 at 10:30.
Reason: Please insert your example PHP codes between [PHP] and [/PHP] tags
|
|
#2
|
|||
|
|||
Re: Need help with Syntaxin the first piece of code $ip is within single quotes therefore it is a part of the string. To fix this you can do either of the following:-
PHP Code:
OR PHP Code:
In the first instance we are using something called concatenation. Ie. we have come out of the single quotes and used a . to show that we are still assigning data to the variable. In the 2nd example we use double quotes ("). Variables within double quotes are evaluated and output their content to the string. |
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linked Lists advice request | promsan | C Programming Language | 74 | 23-May-2007 08:29 |
| syntax errors in document | coder | MS Visual C++ / MFC Forum | 0 | 11-Mar-2006 04:12 |
| Winsock error when compiling FLTK 2.0 Projects | mauriciorossi | FLTK Forum | 3 | 16-Aug-2005 10:18 |
| Help with syntax errors | PeteGallo | C Programming Language | 7 | 08-Aug-2005 20:30 |
| C++ PhoneBook | marita | CPP / C++ Forum | 46 | 12-Jun-2005 12:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The