Guest OskMedia Posted December 12, 2004 Share Posted December 12, 2004 Ok i am trying to do somehtign here if someone that knows MY SQL well please let me know here is what i need i am trying to pull the ItemSKU out of there and put it on page but i can't directly pull it casue of the order number like when the order number is passed i need to some how pull the ItemSKU number with just givng the OrderNUmber so i need basically just to get the ItemSKU out of the databse with giving the OrderNumber shoudln't be hard at all my method not working if anyone knows good sql or osmehting let me know please casue this is really annoying me, -------Josh Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 12, 2004 Share Posted December 12, 2004 i;ve been looking but if anyone knows let me know thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted December 12, 2004 Share Posted December 12, 2004 what are you talking about... ? you said like 15 different things to try to explain one thing and i dont understand what you are trying to do... are you trying to get the column out of the table... or what? Tony~! Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 12, 2004 Share Posted December 12, 2004 saztar whats ur MSN or instant messainign Screen name? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 12, 2004 Share Posted December 12, 2004 AIM: saztar im not on much... but i will sign on right now to talk to you.. Tony~! Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 12, 2004 Share Posted December 12, 2004 added buy i thoguht you would have msn since alot of cubecart buyers / whatever luike ot tlka to people an uaually uk ppl and stuff use msn, but yea i added ya Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 12, 2004 Share Posted December 12, 2004 i imed ya :rolly: Quote Link to comment Share on other sites More sharing options...
Guest Posted December 12, 2004 Share Posted December 12, 2004 not on anymore.. i have msn..but dont use any im's unless someone emails me and wants me to come online... most of my stuff is dont over email... or on forums Tony~! Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 13, 2004 Share Posted December 13, 2004 Ok here is what i am really talking about a better explanation this image below is the Receipt table, basically where itsays ordernumber and you see 1 and then two order number 2's thats becasue both those orders are from the same order like when i made the order i had both those items in my cart and instead of combining both cart items in one cart it makes 2 different rows for every item but they both keep the same order number kinda snazzy, but heres my question when someone orders they go add to cart checkout(select their payemnt method enter address etc) they it redirects to either paypal stormpay or my cc merchant, and they all use ipn which sends ONE variabel back to my server, that one variable is the order number in this case i will use order number 2 for example. This is another version for my digital downloads if you didn't know just an aka. but anyways if they would jsut buy one item i could just send thje ItemSKU (prodict code) over but if someone buy more than one digital item i have to set it this way. . So i need the PHP code to pull the ItemSKU numbers from the databse with just knowing the OrderNumber, as its being the only thing sent back to my server. If soneone thats really familiar with PHP and MYSQL let me know i have tried multiple things but can't find a good answer. So just to say it one more time in ne sentnce i need the code to pull the itemSKU number from databse with just knowing the Ordernumber. I was thinking of maybe if $OrderNumber =="ONU" then list item sku etc etc i was thinking along the lines ofsomething like this, if you know something i would really like that, thanks ----------Josh p.s. heres the image Quote Link to comment Share on other sites More sharing options...
Guest Posted December 13, 2004 Share Posted December 13, 2004 I think what you want to do is you where clause. i.e. select ItemSku from tablename where OrderNumber='2' That will pull all the ItemSku associated with that order number. edit: I closed msn chat window, so forgive me for not responding to your im. (your not on my list) Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 13, 2004 Share Posted December 13, 2004 so would it work if the variable passed was $ONu and how would it pull ALL itemsku's with that ordernumber i can just get it to pull the last one -------Josh Quote Link to comment Share on other sites More sharing options...
Guest Posted December 13, 2004 Share Posted December 13, 2004 :rolly: there is plenty of formus out there about SQL... should check out some of those.. they are useful... honestly i dont know what you are trying to do... but i think there are plenty easier ways to do what you are trying to do.. i could easily pull up every item on an order in a quick little code... no added columns or anything like that. ummm.. i could be not understanding you though. Tony~! http://www.saztar.com/mods Quote Link to comment Share on other sites More sharing options...
Guest OskMedia Posted December 13, 2004 Share Posted December 13, 2004 ok i am just tryingto pull the variable ItemSKU from a specific order number as in this case order number 2 has to items so it would pull both item SKU's i need the my sql code to do that,------OskMedia Quote Link to comment Share on other sites More sharing options...
Guest Posted December 14, 2004 Share Posted December 14, 2004 Doesn't iceman's suggestion work? I would figure a simple WHERE clause would work in this case: $query_order = "SELECT * FROM Receipts WHERE User_ID = '$User_ID' AND Date = '$Date'"; $result_order = mysql_query($query_order ); while($row = mysql_fetch_array($result_order )) { $ItemSKU = $row["ItemSKU"]; ****whatever action you require is coded here**** } Quote Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2004 Share Posted December 18, 2004 booker it does but then again. :D Quote Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2004 Share Posted December 18, 2004 haha... oh well.. cant help them all some problems are above programming - eye! ..lol Tony~! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.