This topic is locked

Error Type 256

9/18/2008 11:04:30 PM
PHPRunner General questions
U
Urnso author

Getting this error:

Error type 256

Error description Unknown column 'STAP00000' in 'where clause'

URL localhost/RunHistory/rootcause_add.php?

Error file C:\wamp\www\RunHistory\include\dbconnection.php

Error line 26

SQL query
I have event codes in 2 places that I narrowed down are causing this. If I remove these I don't get the error but I also don't get the results I need either.
After Record Added

[codebox]global $conn;

$strUpdate = "update albums set JDE='".$values["JDE"]."',

Branches='".$values["Branches"]."',

Description='".$values["Description"]."',

Size='".$values["Size"]."',

Customer='".$values["Customer"]."' where JDE=".$oldvalues["JDE"];

db_exec($strUpdate,$conn);[/codebox]
Add Page Before Display

[codebox]global $conn,$strTableName;

if ($_SESSION[$strTableName."_masterkey1"])

{

$sql = "select Branches, Description, Size, Customer from runhistory where JDE=".$_SESSION[$strTableName."_masterkey1"];

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);

$smarty->assign("value_Branches",$data["Branches"]);

$smarty->assign("value_Description",$data["Description"]);

$smarty->assign("value_Size",$data["Size"]);

$smarty->assign("value_Customer",$data["Customer"]);

}[/codebox]
This is where I am stumped. Fields are set to accept up to 9 digits. If I enter 999999999 I can edit/add without any issues. But STAP00000 will not work. I can add STAP00000 but can't edit it. It seems like anything with letters will not work. Checked MYSQL tables and they are set to VARCHAR (9). I need to enter letters and numbers.
I looked in the forum and so far I am assuming I have ' or a " out of palce. I just can't find it.
Thx!

J
Jane 9/19/2008

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

scuba 11/5/2008

Urnso, I'm troubled be the same error type 256. Well, I can't help you with your problem, but the code you published in this thread solved my problem !!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=34770&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
THANKS!!! (I was getting desperate on this!!)

scuba 11/5/2008

By the way, check if your field is not defined as a numer-field (visual editor / edit as tab / validate as:)