[PHP] query error
I've got a database table with a whole list of "windows" file paths. eg Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Outlook.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft PowerPoint.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Word.lnk Advent Tower PC\C\Program Files\Microsoft Office\MS Access Workgroup Administrator.lnk Advent Tower PC\C\Program Files\Microsoft Office\MSCREATE.DIR Advent Tower PC\C\Program Files\Microsoft Office\OF97SPEC.INI Advent Tower PC\C\Program Files\Microsoft Office\Office Advent Tower PC\C\Program Files\Microsoft Office\Office\1033 Now I want my DB query to search for directories .. here's a sample query select * from ff_files where full_path like 'Advent Tower PC\C\freeserve\help\images\%' doesnt work as the % is taken as a literal '%' I've aslso tried like 'Advent Tower PC\\C\\freeserve\\help\\images\%' I'm completely lost .. all I want is to return all rows that start with 'Advent Tower PC\C\freeserve\help\images\' tia Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query/Error
On Friday 17 May 2002 17:35, Anthony Rodriguez wrote: > I've a php script that creates (inserts) a new record in a MySQL table. It > executes, goes to the next page, but it doesn update the db> > > The db name and table name are OK. I've printed the values passed to the > script and it's OK too. > > What code can I add to the script to find out the error of the query? > > Here's the script: > > > $connection=@mysql_connect("localhost","wagner","xyz") or die ("No > connection!"); > > $db=@mysql_select_db("sbwresearch_com",$connection) or die ("No > database!"); Having a '@' in front of a function call suppresses any error messages that may occur. Reading the manual would tell you that mysql_error() returns the error from the last mysql operation. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* belief, n: Something you do not believe. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Query/Error
I've a php script that creates (inserts) a new record in a MySQL table. It executes, goes to the next page, but it doesn update the db> The db name and table name are OK. I've printed the values passed to the script and it's OK too. What code can I add to the script to find out the error of the query? Here's the script: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php