Jump to content

Ihsaan

Members
  • Posts

    32
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Ihsaan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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. $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
  4. 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?
  5. 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
  6. 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
  7. Thanks Jessica, will try it out and let you know
  8. Thanks QuickOldCar but im more interested to know how to get the code from the url into the input box
  9. 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
  10. @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"
  11. 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
  12. <? $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 ?>
  13. 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; ?>
×
×
  • 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.