confused between ' ' and " "


Posted on 16th Feb 2014 07:03 pm by admin

there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $days_expected DAY) AS begin_date FROM baby WHERE baby_id = $_SESSION['baby_id']" );

Did you know?Explore Trending and Topic pages for more stories like this.
'coz of the double quote, the variable $_SESSION['baby_id'] always be convert into string. how can i keep it as a variable, especially there is single quote go around!!! tried many combination but doesn't work. totally confused @@.
No comments posted yet

Your Answer:

Login to answer
231 Like 16 Dislike
Previous forums Next forums
Other forums

Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

Using unserialize()
Hi there.

I have some data in my database that is serialized.

e.g.

a:2:{i:0

Select Rows as Columns..
is there a way to select COLUMN_NAME from user_tab_columns where table_name='TABLENAME';
and ha

RadioButtonList item spacing
I have a RadioButtonList and I can't put any spacing between the items. They are arranged verticall

preg_replace question
Hello!!

I hope someone can help me with preg_replace.

I load two tables from an extern

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

Newb advice
Hi all,

I'm a flash front end designer and I've taken on a project that needs some back end p

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash