Search Results

Showing results 1 to 11 of 11
Search took 0.01 seconds.
Search: Posts Made By: MaxMumford
Forum: PHP 2 Days Ago
Replies: 3
Views: 167
Posted By MaxMumford
yes post code please.

without seeing the code i think you have two options:

If you have access to the first action page (before paypal) then add this at the very end of the script (before any...
Forum: MySQL Mar 2nd, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
Sure,


$sql="INSERT INTO bookings
(clientID, roomID, startdate, enddate, adults, children, roomtype, requirements)
VALUES
('$last_insert_client_id',
'NULL',
' ...
Forum: MySQL Mar 2nd, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
I think generally to store dates into the database its best to use a timestamp. A timestamp shows the number of seconds that have passed since January 1, 1970 00:00:00 GMT. You get the current...
Forum: MySQL Mar 1st, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
Ahhh i know whats going wrong. This bit:


foreach($result_array as $key => $value)
{
echo '<tr><td>Start Date</td><td>'.$result_array['startdate'].'</td></tr>';
echo '<tr><td>End...
Forum: MySQL Mar 1st, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
Thats really wierd..

Can you send the entire code to me?
Forum: MySQL Mar 1st, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
try using this:


$result = mysql_query("SELECT * FROM bookings WHERE bookingID='".$_POST['bookingID']."'");


sometimes when you don't encapsulate the second part of the where condition in...
Forum: MySQL Mar 1st, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
Ah okay I understand.

the only possible reason for this, is that in your database, you are searching for all records where the bookingID is 33. You must have 9 different records that fit this...
Forum: MySQL Feb 28th, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
<?php

//do your query
$result = mysql_query("SELECT * FROM bookings WHERE bookingID='".$last_insert_booking_id."'");

//because your query uses a primary key, we only have one result and so...
Forum: MySQL Feb 28th, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
What do you mean by:
2) It does bring back everything from the table

As for bringing it back in a table, use this:


<?php

//do your query
$result = mysql_query("SELECT * FROM bookings...
Forum: MySQL Feb 28th, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
yeah sure. assuming you understand arrays, the foreach function cycles through each array segment and runs a specific piece of code for that segment. The segment's title is saved in the $key...
Forum: MySQL Feb 28th, 2009
Replies: 34
Views: 4,354
Posted By MaxMumford
try this:

<?php

//do your query
$result = mysql_query("SELECT * FROM bookings WHERE bookingID='".$last_insert_booking_id."'");

//because your query uses a primary key, we only have one...
Showing results 1 to 11 of 11

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC