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
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
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
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
damn hotmail
if (!isset($_POST['submit']))
{
show_form();
die();
}
$col = strtolower(@$_POST['col_name']);
$sql = "show tables";
$result = connect($sql);
while ($rows = mysql_fetch_array($result))
{
$table = $rows[0];
$sql2 = "show columns from $table";
$result2 = conne
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
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
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
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
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 +
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
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
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,
Im trying to test MySQL.
The code that Im using is below.
PHPtest
Error " . mysql_errno() . ":"
13 matches
Mail list logo