Hi all at Daniweb,

I'm quite new to PHP and I'm banging my head over this...

query 1 WORKS:

$query = "CALL procedure_is_a_great_way_to_let_db_do_some_work('1','6')";
//both 1 and 6 are IN parameters!

query 2 DOESN'T WORK:
$id_pictures = 1;
$id_names = 6;
$query = "CALL procedure_is_a_great_way_to_let_db_do_some_work('".$id_pictures."','".$id_names."')";
//both 1 and 6 are IN parameters!

Recommended Answers

All 2 Replies

Your 2 queries look identical, can you do var_dump($query); after each of them so you can see the computed strings that are being sent.

The only difference I can see is $id_pictures = 1; would be stored as a integer but PHP should add this into the string no problem.

thanks Biiim for your answer.

I don't know what happened... in the mean time I again tried differrent forms of this statements... and when I used the last mentioned sentence it got through. Now it works as it should. I feel 'very olimpic' right now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.