Re: verify data in fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2009-03-08 at 10:25 -0500, PJ wrote:
> My mysql table contains data. But I don't know how to verify what
> exactly is the data... is it an array, an integer, an alphanumeric
> character or what?
> vardump($whatever) returns null; the structure of the table is no null
> for the column fields and has been filled like this:
> $autoid = 1;
> $test = $_POST['categoriesIN']; // this can be several selections from form
> $tstring = implode(',' , $test);
> echo $tstring.'<br />';
> $insert_category = "INSERT INTO book_categories (book_id, categories_id)
> VALUES ($autoid, $tstring.)";
> mysql_query($insert_category,$db);
> 
> retrieval of data is:
> 
> from SELECT ...snip...
> LEFT JOIN book_publisher as abc ON b.id = abc.bookID
> LEFT JOIN publishers AS c ON abc.publishers_id = c.id
> LEFT JOIN book_categories AS d ON b.id = d.book_id
> LEFT JOIN categories AS e ON d.categories_id = e.id
> 
> I have included the publisher stuff - it works, whereas the category
> stuff does not...
> 
> -- 
> unheralded genius: "A clean desk is the sign of a dull mind. "
> -------------------------------------------------------------
> Phil Jourdan --- pj@xxxxxxxxxxxxx
>    http://www.ptahhotep.com
>    http://www.chiccantine.com/andypantry.php
> 
> 
Surely if it is your table, you already know what types of data each
field contains?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux