Re: [PHP-DB] Another dynamic sql.

2002-01-25 Thread Richard Crawford
Raymond, What sort of error are you getting? One of the most useful tools in your toolbox is the print() function. Try doing something like this: $sSQL = SELECT '$car' FROM varetabell WHERE carid='$carid'; print ($sSQL); $sql = mysql_query($sSQL); $myrow = mysql_fetch_array($sql); $x =

Re: [PHP-DB] dynamic sql

2002-01-24 Thread Richard Crawford
Have you tried it? I've done this sort of thing before, and it works just fine. By the time the query string is executed, the variables have been interpreted. So, if $colName = id, and $id = 12, then your query variable looks something like select * from myTable where $colName = $id. By

Re: [PHP-DB] Using variables within a SELECT statement

2001-11-28 Thread Richard Crawford
Try, $query=select * from my_contacts where contactid like '$cir'; Kevin Ruiz wrote: I'm working on an application that selects a user's userid if their password and login match. If the login and password match I want my variable $cir to run its own select statement and return its

[PHP-DB] date_format for Oracle

2001-04-11 Thread Richard Crawford
This isn't strictly a PHP question, I suppose... but is anyone aware of a date_format function for Oracle comparable to MySQL's date_format() function? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[PHP-DB] MySQL and XML

2001-02-14 Thread Richard Crawford
Does MySQL 3 have XML support, or do I need to write (or find) a class to transform MySQL databases into XML documents? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list