Re: [PHP-DB] Batch queries in the same mysql_query()

2005-06-28 Thread Larry E . Ullman
I'm trying to execute multiple queries using mysql_query() function and I'm getting an error to check SQL syntax. My PHP code looks like: You cannot execute multiple queries at once using mysql_query(). If you are using PHP 5.x and MySQL 4.1.x, there are new functions, one of which does allow

[PHP-DB] Re: abstract php code for different databases

2005-06-28 Thread Manuel Lemos
Hello, on 06/28/2005 11:54 AM babu said the following: Recently i have seen Pear:DB package for writing the abstract php code for different databases, i mean creating a common object and using it. Is there any other way to write abstract code for different databases without using the package P

[PHP-DB] abstract php code for different databases

2005-06-28 Thread babu
Hi, Recently i have seen Pear:DB package for writing the abstract php code for different databases, i mean creating a common object and using it. Is there any other way to write abstract code for different databases without using the package PEAR in php. I mean built in php functions. Thanks

[PHP-DB] group by date only

2005-06-28 Thread Larry Sandwick
Can you help me with this query below Mgr's could circumvent the process by login 20 times in 1 day and change the login attempts. This is a rolling 30 window my upper mgmt would like to track. select user, count(user) as num from LoginTrack where user and t='M' and DATE_SUB(CU

RE: [PHP-DB] show tables

2005-06-28 Thread Bastien Koert
damn hotmail

RE: [PHP-DB] show tables

2005-06-28 Thread Bastien Koert
This works for me, note not bulletproof "; if ($result2) { while ($rows2 = mysql_fetch_array($result2)) { if ($col == strtolower($rows2[0])) { echo "Table matching $col: $table"; } } } } function connect($sql) { $username = "root"; $pwd

RE: [PHP-DB] show tables

2005-06-28 Thread Miguel Guirao
there are a set of functions that you should use in order to get the names of the tables, for short, this is the function that you should use: mysql_field_name() But again, you have to use this function along with other functions that list all the tables in a DB. Chicolinux -Original Mes

Re: [PHP-DB] show tables

2005-06-28 Thread Martín Marqués
El Mar 28 Jun 2005 10:43, blackwater dev escribió: > How can I run a query to find all of the tables in a db with a certain > columname? On which database server? -- 11:07:07 up 21 days, 22:53, 1 user, load average: 2.58, 1.14, 0.84

[PHP-DB] show tables

2005-06-28 Thread blackwater dev
How can I run a query to find all of the tables in a db with a certain columname? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Error testing MySQL

2005-06-28 Thread Bastien Koert
Error 0 means that there were no errors in the execution of the query. It does not mean that the query actually returned results that you expect. Bastien From: "Michiel Jordens" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] Error testing MySQL Date: Tue, 28 Jun 2005 10:23:55 +

Re: [PHP-DB] Re: Batch queries in the same mysql_query()

2005-06-28 Thread Denio Mariz
Thank you, dave. The manual pages didn't say anything about the content of the query parameter, but a (good) comment from [EMAIL PROTECTED] about how to escape danger characters from the imput. Yes, there is a risk of SQL injection by allowing the use of ";" inside queries. But I think that this

[PHP-DB] Re: Batch queries in the same mysql_query()

2005-06-28 Thread David Robley
Denio Mariz wrote: > Hi, > > I'm trying to execute multiple queries using mysql_query() function and > I'm getting an error to check SQL syntax. > My PHP code looks like: > > //- > $sql="select x from y ; insert into y values ( 1, 2 )"; > mysql_query( $sql ) or die( mysql

[PHP-DB] Error testing MySQL

2005-06-28 Thread Michiel Jordens
From: Jordens Michiel <[EMAIL PROTECTED]> To: php-db@lists.php.net, php-db@lists.php.net Subject: Error testin MySQL Date: Tue, 28 Jun 2005 15:51:42 -0700 Hello All, I’m trying to test MySQL. The code that I’m using is below. PHPtest Error " . mysql_errno() . ":"