Jump to content

sheraz

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sheraz's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, i am new to mysql. i am working on a project in which i have to delete users's record from 17 tables. the problem is that when i delete a record, it takes too much time. I am only providing a sample query.The query i write looks like this DELETE a, u, pa, pr from admin a LEFT JOIN users u ON u.user_id=a.admin_id LEFT JOIN poll_answers pa ON pa.user_id=a.admin_id LEFT JOIN product_reviews pr ON pr.user_id = a.admin_id WHERE a.admin_id=345 i have used this technique to delete from tables.i.e used 17 LEFT JOINS to delete records. It is working fine but consuming too much time. can somebody help me that how i can optimize query when deleting data from 17 tables.
  2. hi, i want to load the jquery thickbox when the page loads. can some body guide me how to do this. i am trying to do it as below. function showthickbox() { var a = $("#link"); var t = a.title || a.name || null; var l = a.href || a.alt; var g = a.rel || false; tb_show(t,l,g); } <body onLoad="showthickbox();">
  3. sorry, can you more description which informatio you are talking about. i am storing articles in database. are you talking about a counter for each page and storing the counter value in database
  4. hi i am working on a project in which i have to retrieve the articles which are the most visited by the users. i have serched the internet but not find any useful code snippets. can any one guide me how to solve this problem. :-\
  5. sorry for lake of information. now i have modify the code its now working correctly on localhost. the problem is that we are uploading it to linux server. so i think that the problem is of date format as you also said before.
  6. this code works ok but when i set the system date to January 2010 it displays 2010-01 2009-12 2009-12 please check it Thanks :-\
  7. hi, i am working on an assignment in which i am getting current date and then getting date of two previous months i.e 2010-09 2010-08 2010-07 the problem is that the code is working perfectly on localhost but when i upload the file it only shows the current date and do not subtract and display dates. can some body guide me that what is the problem and how to solve it. :-\ here is the code $date1= date("Y-m"); $date2 = strtotime ( '-1 month' , strtotime ( $date1 ) ) ; $date2 = date ( 'Y-m' , $date2 ); $date3 = strtotime('-1 month', strtotime( $date2 ) ); $date3 = date( 'Y-m' , $date3); ?> <select name=""> <option><?php echo $date1; ?></option> <option><?php echo $date2; ?></option> <option><?php echo $date3; ?></option> </select>
  8. hi, i am trying to generate image gallery. but the problem is that when i upload the png files its thumbnail is generated with black background. JPEG an GIF thumbnail are generated successfully. i want to make background transparent. is there any solution that how i can get rid of it. i am using imagecreatetruecolor($thumbwidth, $thumbheight ); to generate thumbnail
  9. i am working on a project in which i am facing a problem. my question is that is it possible to get information/details of a user who is not logged in or who is not registered. if a user logged in then we can find get details easily. but how can i do this. is it possible.
  10. Hi , i want to create an application which will send emails to the users at a given time. for this purpose i am trying to use windows scheduler. but the problem is that windows scheduler requires only .EXE files. So is there any way to convert my php code into .exe file so that i can get my required goals.
  11. hi i am new to working with rss. i m creating an application in which i have to get data from rss and then have to store them in data base. but the problem is that the data is stored improperly. when i run the code , if i display data without saving in DB then it displays 20 records but in database it stores only 10 records. if i try to retrieve records from Database then it only shows 4 to 5 records out of 10 saved records. i also have attached code. i don't know what the problem is. please guide me how to solve this problem. [attachment deleted by admin]
  12. i am talking about many to many relationship dude. i have to create a 3rd table to reference the 2 parent tables, you can say that it will be a foreign key
  13. Hi, i am creating a registration form, i am trying to apply some constraints on the fields, i.e 'name field should not be numeric' and all fields must be non empty. the problem is if user only enter spaces in the fields, the form is validated without any error. please tell me how i can get rid of this problem. :'( function create_account() { $uname=$_POST['uname']; $email=$_POST['email']; $pwd=$_POST['pwd']; $retyped_pwd=$_POST['retyped_pwd']; if(empty($uname) || empty($email) || empty($pwd) || empty($retyped_pwd)) { echo "<font color='red' size=2>Please fillup the required fields.."; } else if($uname=="" || $email="" || $pwd="" || $retyped_pwd=="") { echo "<font color='red' size=2>Please fillup the required fields.."; } else if($_POST['uname']==null || $_POST['email']==null || $_POST['pwd']==null || $_POST['retyped_pwd']==null) { echo "<font color='red' size=2>You typed Empty String"; } ?>
  14. Hi, i am new to database designing. i have to create a bridge table in mysql? if you can guide me that how to do a bridge in phpMyAdmin than it will be better for me. Thanks :'(
×
×
  • 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.