Saturday, 15 January 2011

php - Get data from an insert query? -



php - Get data from an insert query? -

i know can insert id of query with:

$query->id

but there way info out query?

for example, wish homecoming inserted user , output on page. if homecoming info sent insertion not been sanatized , cause problems.

is there way this?

or need query or perhaps manually sanitise data?

databases don't homecoming info inserted; homecoming status indicating whether inserted or not. can't info out $query.

that said... inserted data! you've got access in program. depending on need, might enough. or might not - if programme needs auto-generated timestamps, info produced database triggers, or other info database you'll have utilize query. if you're after info inserted, plus id, you've got in programme , don't have perform db query.

php laravel laravel-4 eloquent

No comments:

Post a Comment