Reply
Getting the information from the database
Old 02-25-2008, 10:09 AM Getting the information from the database
Experienced Talker

Posts: 31
Name: Jin
Location: Bangkok
On my site a user can post a project, once they post the project the information gets put into the database.

After a freelancer can bid on your project and once they click bid the information from the table "projects" is suppose to be queried and the information is now placed in a new section under "bids" along with about 15 other things.

The problem I am having is all of the information that is being placed in the new table is fine except for the project name. Below is the query that is run to get the information and like I said I am able to get all of the information except where it says "project" does anyone have any ideas of where my mistake is? I highlited in red what is used to get the project information that is not working.


Code:
 
SQLact("query", "INSERT INTO bids (username, status, id, project, special, amount, delivery, date, details, date2, chosen, outbid) VALUES ('$username', 'open', '$bid', '" . SQLact("result", $result,0,"project") . "', '" . SQLact("result", $result,0,"special") . "', '$bidamount', '$days', '$month/$day/$year @ $hours:$minutes', '$details', '" . time() . "', '', '$outbid')");
echo '<br><center><b>Your bid has been recorded successfully. If you decide to place a new bid on this project, your old one will be erased.<br>
You will be notified by e-mail when this project ends.</b><br>
<a href="' . $siteurl . '/project.php?id=' . $bid . '">Go back...</a>
<META HTTP-EQUIV=REFRESH CONTENT="30; URL=' . $siteurl . '/project.php?id=' . $bid . '">';
} else {
SQLact("query", "UPDATE bids SET username='$username', status='open', id='$bid', project='" . SQLact("result", $result,0,"project") . "', special='" . SQLact("result", $result,0,"special") . "', amount='$bidamount', delivery='$days', date='$month/$day/$year @ $hours:$minutes', details='$details', date2='" . time() . "', chosen='', outbid='$outbid' WHERE id='$bid' AND username='$username'");

Last edited by Thai Freelance : 02-25-2008 at 10:11 AM.
Thai Freelance is offline
Reply With Quote
View Public Profile Visit Thai Freelance's homepage!
 
When You Register, These Ads Go Away!
     
Old 02-26-2008, 11:01 AM Re: Getting the information from the database
Experienced Talker

Posts: 31
Name: Jin
Location: Bangkok
Does anyone see any problems in the query above?
Thai Freelance is offline
Reply With Quote
View Public Profile Visit Thai Freelance's homepage!
 
Old 02-27-2008, 03:29 PM Re: Getting the information from the database
chrishirst's Avatar
Super Moderator

Posts: 11,872
Location: Blackpool. UK
can't see the query

only some string literals and php variables with unknown values
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Getting the information from the database
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11949 seconds with 13 queries