This topic is locked

Lookup Wizard

4/7/2014 11:37:58 AM
PHPRunner General questions
M
msalim author

I have a lookup wizard and I have selected List page with search and checked the Allow Multiple selection and have this on Add Page before Record Added

global $conn;

if ($values["mAgID"])

{

$arr = explode(",",$values["mAgID"]);

for ($i=0;$i<count($arr);$i++) {

$strInsert = "insert into mFile (AgID) values ('".$arr[$i]."')";

db_exec($strInsert,$conn); }

header("Location: SList_list.php");

exit();

}

When I select two records, it works fine, but when I select 3 or more it does nothing, I only get an SList_add.php?ferror=1& on the URL.

----

Waited for an answer, but none. I'll rephrase it.
Lookup Wizard - List page with search with allow multiple selection checked inserts only two records in table, if three or more is selected, it does not work.

G
gonzalosb 4/17/2014

check if your database is set as MEMO instead of TEXT witch is limit to 255 characters.
you may inserting to much info on the database sell.

what type of database are you using Access or SQL?

i know this is a common problem on Access.

M
msalim author 4/21/2014



check if your database is set as MEMO instead of TEXT witch is limit to 255 characters.
you may inserting to much info on the database sell.

what type of database are you using Access or SQL?

i know this is a common problem on Access.


The field is integer and am using mysql
Thanks

Sergey Kornilov admin 4/21/2014

While this code doesn't make much sense from logical point of view syntax look correct. I would rather use CustomAdd event for this purpose but it may work this way as well.
If you have a valid support contract feel free to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.