Jump to content

Ihsaan

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Ihsaan

  1. I've got data in a mySql database which is updated daily. I would like to allow webmasters to place this data in a form of a widget on their websites provided they pay for access. If not payment comes through we should be able to block access. Any suggestions how this project would be designed?
  2. http://justpaste.it/ejew Could you please have a look
  3. Still coming up blank
  4. $get_lastweek = mysql_query("SELECT SUM(total) as total FROM invoices WHERE date_created > CURDATE() - INTERVAL 7 DAY"); $show_lastweek = mysql_fetch_array("$get_lastweek"); <?php echo ($show_lastweek); ?> When I insert the above into my code it returns nothing
  5. Thanks Barand that worked only thing is that I would like to get the total of last week's sales and not the last seven days. Any idea how to achieve this?
  6. Actually the string I ran in mySql is SELECT SUM(total) FROM invoices WHERE date_created BETWEEN DATEADD(wk, -1,'. GetDate().') AND '.GetDate and the error is FUNCTION billing_accounts.DATEADD does not exist
  7. I tried running the following as suggested as a SQL query directly in mySql and I get the following error FUNCTION billing_accounts.DATEADD does not exist
  8. Thanks Jessica, will try it out and let you know
  9. Thanks QuickOldCar but im more interested to know how to get the code from the url into the input box
  10. I intend printing 10 business cards each one having a QR code that link to a webpabe. The QR code will point to www.test.com/qr?12345 where 12345 is the unique number with each business card. On the webpage there will be an input box and that input box should automatically have the unique number it it. Im trying to wrap my mind around how this will work and how to code it... Any suggestions welcome
  11. @DaveyK strange but true... Im running xampp maybe that has something to do with it... @Zane Thanks man that makes a diffierence only thing its not echoing what i want. It just echoes "1"
  12. I tried it without the quotes and I get a server error 500 and when i try it with single quotes i get the same blank result
  13. <? $get_lastweek = mysql_query("SELECT SUM(total) FROM invoices WHERE date_created BETWEEN DATEADD(wk, -1, GetDate()) AND GetDate()"); $show_lastweek = mysql_fetch_array("$get_lastweek"); ?> <?php echo $show_lastweek ?>
  14. Still showing up blank
  15. This is what I have at the moment but nothing shows up. <?php $get_lastweek = mysql_query("SELECT SUM(total) FROM invoices WHERE created >= curdate() - INTERVAL DAYOFWEEK(curdate())+6 DAY AND created < curdate() - INTERVAL DAYOFWEEK(curdate())-1 DAY"); $show_lastweek = mysql_fetch_array("$get_lastweek"); ?> <?php echo $show_lastweek; ?>
  16. Its in the format of 2012-12-11 08:49:38
  17. How would i display total income for last week in php/mySql? My table has the following columns: ID, Date, Total
  18. When i type my web address into chrome then press tab for search and type in my search query it takes me to a 404 page on my website. The search box on my website works fine but only when coming through chrome does it use the wrong query. How can I remedy this?
  19. Thanks...
  20. I found .htaccess files in almost every folder of a certain website containing the following code. What is it responsible for?
  21. The menu displays fine but now I need to it to go to the details page. I don't mind using a go button but how do i achieve it?
  22. I have a php dropdown box with items from the database but I cant figure out how to make the items in the dropdown link to the details pages of those specific items. So for example the 3rd item in the dropdown is "Joe", when selected it should display the page with Joe's details. <?php echo '<select name="Clients"><OPTION>'; echo "Select an option</OPTION>"; while ($row = mysql_fetch_array($client_select)){ $client_id = $row["client_id"]; $company_name = $row["company_name"]; echo "<OPTION value=\"$client_id\">$company_name</OPTION>"; } echo '</SELECT>'; ?>
  23. I need to setup a page where I can store recurring invoices. How would one go about doing it? Should the invoices be generated for 5 years or can it automatically generate each year one month before its due time? Any suggestions?
  24. i get a blank page
  25. Fixed the $date_created still does not work... Will play around again later tonight maybe im missing something else. Thanks alot Barand
×
×
  • 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.