<?php
$conn = @mysql_connect( 'localhost','root' ,'')
or die( mysql_errno().': '.mysql_error().NL );
$db=mysql_select_db('kiwi',$conn);
$result = mysql_query("SHOW COLUMNS FROM $table");
if (mysql_num_rows($result) > 0)
{
$i=0;
while ($row = mysql_fetch_array($result))
{
if($i==0)
{
echo $q="select * from $table where ".$row[0]."=".$condition;
}
else
{
$q.=" or ".$row[0]."=".$condition;
}
$i++;
}
}
echo 'a';
echo $q;
?>
Secure file download in PHP, Security question PHP, PHP MYSQL Interview Question -Books download - PHP solutions guidelines queries update, phpmysqlquestion
Tuesday, February 22, 2011
Subscribe to:
Post Comments (Atom)
How to solve mysql ERROR 1118 (42000) Row size too large
I had this issue with MYSQL 5.7 . The following worked althoug...
-
PHP has an SSH2 library which provides access to resources (shell, remote exec, tunneling, file transfer) on a remote ma...
-
Which pillar of the AWS Well-Architected Framework recommends maintaining infrastructure as code? Operational Excellence Which of the foll...
-
Introduction to PHP PDO (PHP Data Objects) 1. What is PDO 2. What Databases does PDO support 3. Where do I begin? 4. Connect to ...
No comments:
Post a Comment