Re: search character by character

2002-05-11 Thread Intruder
Replace your sql select query with these lines: SELECT LASTNAME, FIRSTNAME, DEPARTMENT FROM EMPLOYEES WHERE LASTNAME LIKE '%varLastName%' It makes caseinsensitive search, so when varLastName is 'C' it will find Clark and Wilcox ,because they contain letter 'C'. Also you can use 'varLastName%'

RE: How to sum() with php query?

2002-02-12 Thread Intruder
I have a column of amounts that was getting adding in a loop but I see there's a sum() function to do this. Should have known. But I can't make it work. Can someone give me a simple query syntax using php? $table=my_table; $field=some_field; $sql=SELECT sum(cost) AS cost FROM '$table'

RE: Counting up numerical values in a table

2002-01-02 Thread Intruder
I am trying to add floating point numbers, and also plain numerical values, - I have looked on mysql.com but I only seem to find stuff that relate to counting rows of a certain defined value - like count where something = something, but I want to say give me a numerical total value for a

Re: The opposite of where column_name LIKE %string%

2001-10-18 Thread Intruder
CA $ select * from table_name where column_name like %my_string%. select * from table_name where column_name NOT like %my_string%. ;))) - Before posting, please check: http://www.mysql.com/manual.php (the manual)