Jump to content

Baabu

Members
  • Posts

    71
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Baabu's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello every one, i m stuck with a "+" symbol in my database and php i have an item listed with it's name "AZ+" in my database but when i try to add it to an invoice it says not found bcoz in the name variable through which "AZ+" is passed to invoice page it only takes "AZ" not the plus i guess it is something like decode or encode can anyone tell me how to avoid this decode or encode condition and this "AZ+" should work Best Regards Baabu
  2. thx for your help mate i just placed $dt and it worked but when i use the query u told me it does not display anything even if i echo query it is displayed like this select * from pls where stock_Date = CURDATE() where as this is way i m using to echo it echo "select * from pls where stock_Date = CURDATE() "; but if i use echo "select * from pls where stock_Date = $dt "; it displays correctly Regards Baabu
  3. <?php $sql = "SELECT * FROM scores where playername = $playername"; $result = mysql_query($sql); $score=0; while ($row = mysql_fetch_array($result)){ //do rest here $score+=$row["score"];//where score is the column name in the database } echo "Total".$score; ?> Hope this works for you.
  4. $dt=date('Y-m-d'); $dtd=date('d'); $dtm=date('m'); $query=mysql_query("select * from pls where MONTHDAY(stock_Date) ='$dtd' and MONTHNAME(stock_Date)='$dtm' "); well can anyone tell me that how can i extract the date from stock_Date in the format as the date function does like for $dtd=11 and for $dtm=3 how can i get from stock_Date as its format is also just like $dt
  5. if(isset($from_price) && isset($to_price)) { $add .= " AND price BETWEEN '$from_price' AND '$to_price'"; } try this ...if both are set then this query will be added..else not
  6. well i guess datetime is also a data type in mysql may be you should try to change the column name for datetime and then try
  7. hi there i have been trying to use date functions for some function it worked but not for the current time or date here is my query i m using query=mysql_query("select * from pls where MONTHNAME(stock_Date)='March' "); it works for this but how should i use it for current date where as the type of stock_Date is DATETIME i want it to select from pls all the entires for todays date how should i do...any help
  8. Look out for your FIVE years
  9. well it is also meaningless to posting a reply to that post which u are unable to understand this is what the way is other then putting a period it is much better to sit a side let the others go for it if they want rather then making the help method useless and always leave a hope for any one who is trying to learn do not tell them to go off the road.
  10. this wasn't the place for using periods you should try back for five years that suggestion needed was regarding dates not periods so look out for your five years:)
  11. Well i guess haku with due respect you can look at your self also...
  12. well what if i want to view all the entries of the 3 day how should i use in where clause or some other syntax??
  13. well how can we use the function date() in our query if suppose we have a table like create table test( datex date ); so can we use if we have some vales of datex $query=select * from table order by date(); or anything like that
  14. can anyone help me on this the output should be like 2-12-2007 The total Quantity on 2-12-2007 was quantity just like this
×
×
  • 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.