CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 error in selecting/deleting from MySQL db

Print topic Send  topic

Author Message
Ola
Posted: 03/07/2002, 12:46 AM

I get this error:
Database error: Invalid SQL: select u.undefined as u_undefined from users u
MySQL Error: 1054 (Unknown column 'u.undefined' in 'field list')
Session halted.

What I want to do , is to delete the whole record for which the checkbox is marked. user_id is the primary key field in table users.

My code looks like this in Delete.php Events/Open:

$sSQLm = "select max(user_id) as m from users";
$db->query($sSQLm);
$max = $db->f("m");
for ($i=1; $i<= $max; $i++)
{
$on = get_param("$i");
if ($on != "")
$sSQLd = "delete from users where user_id =".$i;
$db->query($sSQLd);
}



/Ola
Nicole
Posted: 03/07/2002, 1:50 AM

Ola,
refer to my response for thread:
error in "Delete record with checkbox"

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.