Re: [PHP-DB] Escape for MSSQL?
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... } }Does anybody know how I can store a double-quote (") within a string in }a MSSQL-database? } See: http://www.mysql.com/doc/S/t/String_syntax.html And the handy PHP function addslashes() http://www.php.net/manual/en/function.addslashes.php -- Jeff Carnahan - [EMAIL PROTECTED] -- 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 administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Escape for MSSQL?
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... }In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... }} }}Does anybody know how I can store a double-quote (") within a string in }}a MSSQL-database? }} } }See: http://www.mysql.com/doc/S/t/String_syntax.html } }And the handy PHP function addslashes() } }http://www.php.net/manual/en/function.addslashes.php } My apologies, you said MS-SQL.. Not MYSQL.. =) See: http://msdn.microsoft.com/library/wcedoc/adoce31/adoguide_27.htm =) -- Jeff Carnahan - [EMAIL PROTECTED] -- 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 administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] SELECT query
Have you thought about normalizing your data model? It could make your task a lot easier. Doug At 11:33 PM 4/13/01 +0530, Sharmad Naik wrote: I have three table called table1, table2, table3 all having fields like: table1 contain id and username and id referencing table4 table2 contains id and parallel_username and id referencing table4 table3 contains id and other_username and id referencing table4 table4 is the main table containing id as primary key I want to develop a search engine which shows unique record after searching all the three table but shouldn't contain multiple answers for same SEARCH for username Pls help me, -Regards Sharmad -- The secret of the universe is @*!'^#+ NO CARRIER ___ _ _ _ |_|_||_||_||\/||_|| \ _|| || || \| || ||_/ -- 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 administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] SELECT query
On Fri, Apr 13, 2001 at 02:23:50PM -0400, Doug Semig wrote: Have you thought about normalizing your data model? It could make your task a lot easier. I have normalized my table structure this is just a practice model i m trying I want that the search should be on username whereby first i search table1 ,then table2,table3 using table4 and displaying unique record At 11:33 PM 4/13/01 +0530, Sharmad Naik wrote: I have three table called table1, table2, table3 all having fields like: table1 contain id and username and id referencing table4 table2 contains id and parallel_username and id referencing table4 table3 contains id and other_username and id referencing table4 table4 is the main table containing id as primary key I want to develop a search engine which shows unique record after searching all the three table but shouldn't contain multiple answers for same SEARCH for username Pls help me, -Regards -Regards -- The secret of the universe is @*!'^#+ NO CARRIER ___ _ _ _ |_|_||_||_||\/||_|| \ _|| || || \| || ||_/ -- 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 administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] diferent user passwords
* Romeo Manzur ([EMAIL PROTECTED]) wrote: how could I configure diferent user password to each database on my server??? You can probably achieve this with grant statements. Grant SELECT on test.* to myuser@localhost identified by 'pass1'; Grant SELECT on other.* to myuser@localhost identified by 'pass2'; Jeff -- 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 administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] odbc_fetch_row
maybe you could try odbc_num_rows($yourResultID) this will return 0 if there is nothing in the result set or the number of rows otherwise look in the php manual for more info http://www.php.net/manual/en/function.odbc-num-rows.php note that it might return -1 (thus not work as intended) with some drivers, look in the user contributed notes at the bottom of the manual page, there seems to be a few solution to that -1 problem Francois Legare [EMAIL PROTECTED] Vancouver BC Canada 604.261.1320 -Original Message- From: Randall Barber [mailto:[EMAIL PROTECTED]] Sent: April 13, 2001 3:30 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] odbc_fetch_row When I run a query, even if it is empty I still get a valid identifier for the result. How do I determine that there is nothing in the result, even though the result is valid (just empty)? I thought about odbc_fetch_row, but that moves the pointer forward and I don't want that; there may be valid info. I tried odbc_result'ing a COLUMN and it returns NULL not error, so I can't test against that. One thought is to see if all columns in my query are NULL and then "No rows were found". Is there a simpler way? How does odbc_result_all determine there is nothing present? Thanks RDB -- 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 administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Postgres auto increment.
I've been using mysql too much lately. Can anyone tell me how to set up an auto increment in postgres? I need to select a row based on a user's menu selection. Requiring them to type in a text entry and get it right would obviously be pretty inefficient. Thanks, John -- 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 administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Postgres auto increment.
Just off the top of my head...so please forgive any typos or blatant mistakes... CREATE SEQUENCE sequencename; CREATE TABLE mytable ( id int DEFAULT NEXTVAL('sequencename'), whatever varchar(32), PRIMARY KEY(id) ); Doug At 11:28 PM 4/13/01 -0600, John Starkey wrote: I've been using mysql too much lately. Can anyone tell me how to set up an auto increment in postgres? I need to select a row based on a user's menu selection. Requiring them to type in a text entry and get it right would obviously be pretty inefficient. Thanks, John -- 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 administrators, e-mail: [EMAIL PROTECTED]