Jump to content

Namtip

Members
  • Posts

    110
  • Joined

  • Last visited

    Never

Everything posted by Namtip

  1. Yup you're right Nightslyr, its good to get an unbridled programmers response. He's canceled the project, now I just need to get my money back from escrow. So I should be alright.
  2. Nope it's with a company called elance. He's still trying to get me to agree to the options, I hope I get my money back so I can invest it properly. I shouldn't have gotten greedy.
  3. I'm using a famous site called elance to get someone from India to make me a site! I posted my job specs and got talking to the developer. Whilst talking to the developer the specs changed, they're using joomla, instead of hand coding. I've asked for ALOT more features. I asked "With that in mind, I'm happy with what you've proposed. Are you ready for work right away? Or should I wait before I select you and shall I put the $604 into the escrow account?" they replied "I have gone thoroughly your requirements and we assure you that you will get what you need. We are ready to start the project but as we are Pvt. Ltd. Company we need go with our company policies and according to our company policies we need the escrow fund to start the project. I hope this would not be problem with you and you will co-operate with us. Looking forward for your acceptance!" So I took that as a "yes, we'll do it for that price" Was i misleading myself? I then added the money to the escrow account and they said this afterwards. "Since when we placed our quote(bid), requirements didn't have funding and escrow feature of your website that is why we had to discuss before accepting your job. We have discussed your added requirements and we have to re-estimate the project due to the funding and escrow feature of your website. As we have discussed the features now I have prepared the report and we are attaching it along with the message. Please review it and let us know your response!" To deal with this problem they've offered several solutions. original specs $600 new specs $600 + $2500 for aj square software. hand coded $2400 I'm troubled by the few reviews I can find on this aj square company. http://www.xomreviews.com/ajsquare.com http://www.hotscripts.com/listing/aj-auction-pro-build-your-own-auction-site-like-e-bay/ http://www.consumercomplaints.in/complaints/aj-square-c432613.html I know I've made some errors, but what do you guys think. Please be objective and flame me if you think I should be flamed *puts on flame suit*. I feel like I've been a little greedy(my fault)/a little misled. I've asked if they'll release the money from the escrow account, so I can resubmit the work (they've not started work on it yet). If they don't want to do that I'm going to ask if they'll make a site for my brother for the money instead. The mistake.txt contains our conversations over the past few weeks. [attachment deleted by admin]
  4. I'm going through my project trying to find a way of separating the backend (the query and php code) from the frontend (html/css). I want to bring the two together with the include function. I've done other but I'm getting confused because the while loops html code. I don't want someone to do this for me, I just what someone to highlight the most logical way. <?php include 'auth.inc.php'; include 'db.inc.php'; include 'buy.inc.php'; //connect to database. $db = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD) or die ('Unable to connect. Check your connection parameters.'); mysql_select_db(MYSQL_DB, $db) or die(mysql_error($db)); //select orders that this user has bought. $query2 = sprintf('SELECT d.name_id, d.order_id, d.order_qty, d.product_code, feedback, p.title, c.email FROM order_details d LEFT JOIN product p ON d.product_code = p.product_code LEFT JOIN contact c ON d.name_id = c.name_id WHERE d.buyer_id = "%u"', mysql_real_escape_string($_SESSION['name_id'])); $result2 = mysql_query($query2, $db) or die(mysql_error()); //echo out the information in a while loop, add pagination? $odd = true; while ($row2 = mysql_fetch_array($result2)) { echo ($odd == true) ? '<tr class="odd_row">' : '<tr class="even_row">'; $odd = !$odd; echo '<td style="text-align: center; width:100px;">' . $row2['title'] . ' <table> <tr> <th colspan="2">Shipping Information</th> </tr><tr> <td>First Name:</td> <td>' . $row2['title']. '</td> </tr><tr> <td>First Name:</td> <td>' . $row2['order_qty']. '</td> </tr><tr> <td>Last Name:</td> <td>' . $row2['product_code']. '</td> </tr><tr> <td>Billing Address:</td> <td>' . $row2['email'] . '</td> <td>' . $row2['order_id'] . '</td> </tr> </table> </tr>'; if ($row2['feedback'] == 0){ echo ' <form action="reputation.php" method="POST"><p>Please give the seller feedback on how you have received your product. <td><input type="hidden" name="name_id" value="' . $row2['name_id'] . '"></td> <td><input type="hidden" name="order_id" value="' . $row2['order_id'] . '"></td> <td><input type="submit" name="submit" value="Feedback"/></td> </form>'; } } ?>
  5. That's why they re-vamped their website and released version 3 Poor guys. A guy that I pay to critique my code said that I should use kohana. Its got a stronger community, but after fiddling with it I've discovered some pretty weak documentation. Oh well, I'll stick with it and practice my OOP. This is the best tutorial I could find, even if the first one is a bit out of date for v3 kohana. http://net.tutsplus.com/tutorials/php/kohana-the-swift-php-framework/ http://kerkness.ca/wiki/doku.php -links are at the bottom of the unofficial wiki I still think yii looks amazing.. much better documentation imo. http://www.sheldmandu.com/php/php-mvc-frameworks/php-mvc-framework-performance-part-1 Anyone know if you can swap frameworks mid-development or post development?
  6. I've read Google. Including the the forums with similar questions that had irate posters telling the OP and me to read Google. And I've run back to phpfreaks with my head reeling from discussions based in 2007 (smarty is dead apparently). What MVC should I use for a user-centric site that has two types of accounts (buyers and sellers), that sells products for the sellers and then takes a commission? The site would be made from PHP, MYSQL, AJAX, CSS and HTML. I have been looking at yii, drupal and Kohana. Although the size of Kohana's and Yii community concerns me. I'd also need to be able to edit the code and possibly the DB(if that's possible). The site would need to be scalable.
  7. Thank you PFMaBiSmAd. Have you got a tip box? I'd love to put some money in it.
  8. Ultimate goal is for the query to find the row in the database to avoid the validation and carry on with the rest of the script. What actually happens is the script runs without any parse errors but it doesn't find the row within mysql. $query = sprintf('SELECT name_id, title, description, price, width, height, depth, quantity FROM art WHERE product_code = "$u"', mysql_real_escape_string($product_code, $db)); $result = mysql_query($query, $db)or die(mysql_error($db)); if (mysql_num_rows($result) != 1) { header('Location: home.php'); mysql_free_result($result); mysql_close($db); exit(); } I've echoed the where variable and the mysql_num_rows($result). the where variable is as expected but the result variable comes out as 0. I've checked my phpadmin and there is a entry in there. This worked fine before I sprinted the table. Any help appreciated.
  9. Thanks for the response Thorpe, the query is copied directly from my text book except for the names of the column and tables, but apart from that the layout is exactly the same. It just selects the information from the users cart and enters it into orders before the cart information is deleted. It works as intended but I guess theres prolly a better way. So I guess I have to use printf too. Thanks for the information.
  10. 1: whats the point of printf? I mean can't you just make do with sprintf? 2:How do you go about putting the following table into sprintf? $query = 'INSERT INTO order_details (order_id, order_qty, product_code, buyer_id, name_id) SELECT ' . $order_id . ', qty, product_code, ' . $_SESSION['name_id'] . ', name_id FROM cart WHERE session = "' . $session . '"'; mysql_query($query, $db) or (mysql_error($db)); I've checked google for both questions. If you think I'm being cheeky could you just answer my first question and ignore my second.
  11. Thanks gizmola, that was a great help.
  12. I'm tapping out to this one, I can't see straight, and I've been trying to answer it by banging my head against for a while now. Just when I think I'm getting the hang of this.. wa pow! night people.
  13. $query3 = 'UPDATE ecomm_orders_details SET feedback = "' . mysql_real_escape_string($feed) . '", WHERE order_id = "' . $order . '"'; mysql_query($query3, $db) or die(mysql_error($db)); You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE order_id = "1"' at line 4 I don't understand why it has a problems with where order_id = 1. because thats where I want the query to change the already existing column.
  14. I echoed the query into phpmyadmin, and nothing gets updated. The tables columns are shown in the right of the query. nothing is displayed errorwise.
  15. since adding or die to the query I get this error messages with the adaptions to the code. $query3 = 'UPDATE ecomm_orders_details SET feedback = "' . mysql_real_escape_string($feed) . '", WHERE order_id = ' . $order_id; mysql_query($query3, $db) or die(mysql_error($db)); I recieve this error: Duplicate entry '1' for key 'PRIMARY' $query3 = 'UPDATE ecomm_orders_details SET feedback = "' . mysql_real_escape_string($feed) . '", WHERE order_id = ' . $order; mysql_query($query3, $db) or die(mysql_error($db)); and I get: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE order_id = 1' at line 4
  16. just tried that, it echoes out what I expect it to. UPDATE ecomm_orders_details SET feedback = "1", WHERE order_id = "1" do I need to set all the column when I update or can it be just 1 column like I've tried to do.
  17. I normally put solved on self answered posts.
  18. I've echoed all the variables and all the values match up. problem: There is no parse of sql error, but the query does not update the database. $query3 = 'UPDATE ecomm_orders_details SET feedback = "' . mysql_real_escape_string($feed) . '", WHERE order_id = "' . $order_id . '"'; mysql_query($query3, $db) or (mysql_error($db)); header('Refresh: 5; URL=main.php'); Can you guys see why this isn't working?
  19. Don't mind me, I treat this place more as a notepad to work things out is that bad? - here's the code that works: if ($ans<= 0) {$query1 = 'DELETE FROM ecomm_temp_cartWHERE session = "' . $session . '" AND product_code = "' . $row['product_code'] . '"';mysql_query($query1, $db) or (mysql_error($db));echo 'This ' .$row['product_code'] . ' is sold out.';
  20. Is it possible to delete rows where two variable match? I'm not getting any parse or mysql errors. Here's a bigger part of my script: $query = 'SELECT h.product_code, h.qty, j.product_code, j.quantityFROM ecomm_temp_cart h JOIN ecomm_products j ON h.product_code = j.product_codeWHERE h.session = "' . $session . '"';$result = mysql_query($query, $db) or (mysql_error($db));while ($row = mysql_fetch_array($result)) {if (isset($row['product_code']) > 0) {$ans = $row['quantity'] - $row['qty'];if ($ans<= 0) {$query1 = 'DELETE FROM ecomm_temp_cartWHERE session = "' . $session . '" AND product_code = "' . $row['product_code'] . '"';mysql_query($query, $db) or (mysql_error($db));echo $session;echo 'This ' .$row['product_code'] . ' is sold out.';}}}mysql_free_result($result);
  21. tried the following but still got the same result. 1 $query1 = 'DELETE FROM ecomm_temp_cartWHERE session = "' . $session . '" AND product_code = "' . $row['product_code'] . '"';mysql_query($query, $db) or (mysql_error($db)); 2 $query1 = 'DELETE' . $row . 'FROM ecomm_temp_cartWHERE session = "' . $session . '" AND product_code = "' . $row['product_code'] . '"';mysql_query($query, $db) or (mysql_error($db));
  22. Problem: I've echoed out all the variables and they all come up and the while loop works too but I want to delete a row from a table where the $session and $row['product_code'] variables match. Result: The row does not get deleted. while ($row = mysql_fetch_array($result)) { if (isset($row['product_code']) > 0) { $ans = $row['quantity'] - $row['qty']; if ($ans<= 0) { $query1 = 'DELETE FROM ecomm_temp_cart WHERE session = "' . $session . ' AND product_code = ' . $row['product_code'] . '"'; mysql_query($query, $db) or (mysql_error($db)); echo 'This ' .$row['product_code'] . ' is sold out.'; } } } Any help appreciated.
  23. $query2 = 'SELECT d.name_id, d.order_qty, d.product_code, p.title, c.order_id, c.shipping_first_name, c.shipping_last_name, c.shipping_address_1, c.shipping_city, c.shipping_state, c.shipping_zip_code, c.shipping_email FROM ecomm_order_details d LEFT JOIN ecomm_products p ON d.product_code = p.product_code LEFT JOIN ecomm_orders c ON d.buyer_id = c.customer_id WHERE d.name_id = "' . mysql_real_escape_string($_SESSION['name_id']) . '"'; $result2 = mysql_query($query2, $db) or die(mysql_error()); $odd = true; while ($row2 = mysql_fetch_array($result2)) { echo ($odd == true) ? '<tr class="odd_row">' : '<tr class="even_row">'; $odd = !$odd; echo '<td style="text-align: center; width:100px;">' . $row2['title'] . ' <table> <tr> <th colspan="2">Shipping Information</th> </tr><tr> <td>First Name:</td> <td>' . $row2['shipping_first_name']. '</td> </tr><tr> <td>Last Name:</td> <td>' . $row2['shipping_last_name']. '</td> </tr><tr> <td>Billing Address:</td> <td>' . $row2['shipping_address_1']. '</td> </tr><tr> <td>City:</td> <td>' . $row2['shipping_city']. '</td> </tr><tr> <td>State:</td> <td>' . $row2['shipping_state'] . '</td> </tr><tr> <td>Zip Code:</td> <td>' . $row2['shipping_zip_code'] . '</td> </tr><tr> <td>Email Address:</td> <td>' . $row2['shipping_email'] . '</td> </tr> </table> </tr>'; } Yup, thanks so much, above is the fixed code.
  24. You're spot on! I typed in another order then checked the the loop and it shows one row (instead of two). PHP is easy but it has so many quirks to it. I'm to mess around with it. See if I can get it to work with that in mind.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.