Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



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

Posts: 34
Name: Jin
Location: Bangkok
Trades: 0
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 11:11 AM..
Thai Freelance is offline
Reply With Quote
View Public Profile Visit Thai Freelance's homepage!
 
 
Register now for full access!
Old 02-26-2008, 12:01 PM Re: Getting the information from the database
Experienced Talker

Posts: 34
Name: Jin
Location: Bangkok
Trades: 0
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, 04:29 PM Re: Getting the information from the database
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
can't see the query

only some string literals and php variables with unknown values
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Getting the information from the database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.11397 seconds with 12 queries