|
|
 jim le | 2006-09-06 18:04:54 |
Hello.
I found your forum integrator very useful.
I have little experience with php and mysql, so I was wondering if it would be okay for you to write up a quick example of how I would use this function ($x->query($sql)).
Many thanks in advance. |
| |
2. Re: $x->query($sql) |
|
Reply |
|
|
 Piotr Malinski | 2006-09-07 15:40:47 - In reply to message 1 from jim le |
$x->query("SQL CODE HERE") will execute the SQL Query. If it is a SELECT it will return an array with results (array of associative arrays)
$x->query("DELETE FROM mytable");
$query = $x->query("SELECT FROM mytable");
if(is_array($query[0]))
{
foreach($query as $res)
{
print $res['columnName'];
}
} |
| |
3. Re: $x->query($sql) |
|
Reply |
|
|
 jim le | 2006-09-07 17:47:30 - In reply to message 2 from Piotr Malinski |
| Thank you. |
|