Deleted Record Still Being Counted.
Can anyone see any reason why this query would not return the number of rows containing the correct "EID" "CID" where email address is "cs.com" or "webtv.com".....
for some reason it always returns 1 even if the database is empty. The only other flaw that I see is that I had a record that matched this criteria, then I deleted it from the database, but it still seems to want to count it for some reason. PHP Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Get In Line To Be Counted
I have a script that displays photos from activities of my organization. They are organized into groups by activity. On the first page each main group of photo's info is called from a text file, they click on the group they want and are forwarded to another page. On that page the image source and the description of the 10 or so images in that group are called from another text file. How could I make a running count of how many people viewed each group. This would be very similar in purpose to the way this bullitin board counts the views of each thread. I thought of keeping the hit count of the group in the same file as the group names are in but was unsure if the info would be corrupted if too many people tried to open the group and therefore had many people trying to rewrite the file at once. Could anybody tell me how to count visitors to a link accuratly and efficiently without loss of data?
Sort A List Of COUNTED Results?
I have a database holding a list of customer`s orders, i thought it would be neat to show the top 5 selling products on our website. Now i have a recordset that counts each product sold which COUNTS by model_ID and GROUPS BY model_ID But heres the problem i wish to show the highest COUNT descending?? So the highest COUNT is at the top and show five records giving me the Top 5 Selling models? At the moment it lists them in model order as you would expect.. here is the rough Recordset:- SELECT *, COUNT(mode_ID) FROM order_item,products WHERE products.prod_ID=order_item.mode_ID GROUP BY mode_ID
Compare Record With Session Variable And Update Record If Different
I'm trying to figure out how to create a session variable from a recordset field value in a mySQL database and compare this with subsequent values from the same field each time the page reloads. When the value of the field changes (as a result of a user update) I want to trigger an event (redirecting to another page). It's probably a very basic PHP function but I am a newbie with this language.
Directory Deleted
So far i m using following code for deleting folders and files.But it will only delete those folders which r empty.I want to delete those folders also which has some files.pls give me the solution <?php error_reporting(0); include("../connection.php"); $date = date("m/d/Y"); //For finding current current function dateDiff($dformat, $endDate, $beginDate) { $date_parts1=explode($dformat, $beginDate); $date_parts2=explode($dformat, $endDate); $start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]); $end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]); return $end_date - $start_date; } ?> ....................
Get ID Of Deleted Items
I wonder if there is anything similar to "mysql_insert_id();" for deleted/updated id's? If i do a query and DELETE WHERE text_field="", can i get the id's of the fields that were deleted?
Session Files Will Not Be Deleted
My problem: - i dont wan´t to destroy the session - i want that the session will be deleted by "php" when the gc maxlifetime parameter hits - i can turn this parameter on what i want - nothing will be deleted! - in my specail case - i make use of session_save_path - i use my own Could it be, that "php" doesnt delete session files in own session_save_paths ?
Deleted Php.ini And Cant Produce An Error
I deleted every instance of php.ini on my computer and restarted IIS. I was hoping i could envoke an error so I can figure out which php.ini it was using. But my application runs normally.
Help! Need To Recover Deleted Tables!
Im not sure if Im in the right place here but .. I am using a unusual combo of PHP MSSQL ODBC and MSAcess on a windows server 2003 box. All my tables in a database were deleted using the SQL "DROP TABLE" command. Can these be recovered? And if so, how?
$_SESSION['data'] Not Being Deleted?
I got a login script that basically does that: checks wether username and password is in a mysql file and then sets the variable loged_in to 1 like that PHP Code:
Filling In For Deleted Images
I am creating an image gallary where the images are numbered 1, 2, 3 etc. Users will be uploading the images so if i need to delete an image, I need the code to be able to check if that number has been deleted and replace it with the next uploaded image. I have the code pulling from a txt file with a counter to name each file. The problem is that if images "36", "29" and "2" are removed... I need those slots to replaced in numerical order with the next uploaded images. So the next image will be named image "2" and will show up as the 2nd image on the page. Code:
File Automatically Being Deleted
Whenever index.php or .htaccess are created in a directory, they are automatically deleted. I'm guessing it is some kind of backdoor attack. Setting permissions to read only didn't help. Does anyone know how to see what is deleting the file? or protect it?
Info Deleted Itself From Database?
I got some info (news system) in a SQL database but after some days it deletes by itself it happened to me once but i thought i didnt remembered that i deleted it but today it happened again...it deleted by itself! lol I have other tables in the same database so its a table problem... How can i fix this? Did i miss something at the table configuration?
I've Deleted Admin Username And Password,
I've deleted my admin username and password which was initially set at test. Now I can't log into my website as the administrator. How do I put Username and Password back so that I can set my own password and username again, log in to my website and edit it. Which file do I have to edit, and where do I re-set the Username and Password?
Updating Id Numbers To Be Consecutive After Deleted Some
I have a list of ip addresses that have accessed my web site and i have check boxes next to them so i can delete whichever ones i want. after i delete them, i want the name_id field to re-autoincrament after the other rows have been deleted. does anyone know how to do this? i know this line can set the autoinc to a new number, but how do i re autoinc the whole table?
Character Deleted And Mail Function
I use the mail function in order to send mail on a LAN Lotus Notes server (SMTP). I send big html mail with the "MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1" format. But, in the message, some characters are deleted, one for 10 lines. After a test, (message with 1234567890), a character is deleted approximately every 1000 character. Have you some ideas ? The problem is coming from php or Lotus Notes ?
Script To Access Expired/deleted Domains?
Does anyone know if there is a script available to access expired/deleted domains? If not, does anyone know how do you get access to the daily expired/deleted domains database?
Reset Row "id's" After Arbitrary Value Deleted
Is there a way to reset the auto_increment value and all subsequent values for that table if you delete an arbitrary row? example: row 0 - test info row 1 - test info row 2 - test info row 3 - test info new auto_increment value = 4 I delete row 2, so table looks like: row 0 - test info row 1 - test info row 3 - test info the auto_increment is still 4, but there are only 3 rows in the table and the values are not correct. Is there a function or easy way to "reorganize" the row values and reset the auto_increment?
A "few" Old Session Files Never Deleted?
I have session files stored in a special tmp directory specific to a virtual host instance. The Max_lifetime is long 86400 (1 day) which I don't suppose is the problem. Anyway the sessions do indeed expire and "most" of the old session files disappear as expected. Not all however. I am finding several old session files with Unix last mod times weeks in the past. This behavior observed on PHP 4.2 and 4.3.
Next Record?
How do I find a value of a field in the next record? For example a user submits a form to update record1. Once the record is update, I then want to redirect back to the form and input the value from a field from the next record (record2) to the header of the page.
Getting Rank Of Record ..
I have a mysql query to select all singers from a database and order them by hits field .. select * from singers order by singer_hits now lets say i am on the songs page of singer with singer_id = 6 i need to get this singer rank according to hits... so if singer number 6 is the result number 40 in the above query so the singer is ranked number 40 all over other singers... any help on how to construct this query or php function ??
Record From DB Problem
I can grab the array I want and display it with the following code: $myrow = mysql_fetch_array($result); for ($i; $i<sizeof($myrow); $i++) { echo $myrow[$i]."<br>"; } However I’d like to display the entries in the record with some html formatting, so what to do something like this: $po_num = $myrow["po_num"]; *$form_type = $myrow["form_type"]; *$name = $myrow["name"]; *$department = $myrow["department"]; *$date_required = $myrow["date_required"]; *$vendor = $myrow["vendor"]; -This give me an error. However using echo $myrow["column_name"]; elsewhere in the form doens't. Why can't I do this?
Getting One Record From MySQL
I am very new to php-mysql, and im a bit confused by all the tutorials which explain how to get records from mysql. In all the tutorials, they show how to recover all records from a table using a loop command. I have a mySQL table called news, which has headline and a body fields (as well as id). On my php page, i have two seperate tables. One I wish to print the info from one of the headline fields , and the info from the field body in the other. I don't wish to print all the records.
How Do You Email From A Record?
I am using PHP to pull up records from a MySQL database onto an HTML page. The records are simply name, telephone number, email address etc. What I want is, after every record is a checkbox. You tick as many boxes as you like and then press a button at the bottom of a page which opens your email client with all the email addresses of the people you have clicked in the 'to' line. How do you do this please?
ID Of Record Not Returning ?
The following code returns the fields from the row ( $product for example is used later and displays OK ) except the 'prid' field ( only ever has zero), which is the unique ID for this table. Any thoughts appreciated - PHP Code:
Test For PTR Record
I need to test a IP for a PTR record and display the outcome. The problem i have is i need to test with 2 vars. $host = the ip $hostmask = the hostmask How do i use 2 vars in one function so i can call it like: test_ptr($host, $hostmask) Ive tested this but cant seem to get it to work. code below. Thanks in advance function test_ptr($host) { if (strlen(gethostbyaddr($host))== strlen(gethostbyname("$hostmask"))) { $emsg = " !!Couldent find PTR Record!!"; } }
How Do I Retrieve The Next Record?
I am searching the mySQL DB for a particular item num. When it retunrs the result I want to be able to go to the 'NEXT' and 'PREV' records in the order of the Table. Do I first need to put in an auto increment or index column?
A Graphic Per Record
I would like advice on the simplest way to have a graphic appear next to a line of text, when displayed. Essentially this is a Knowledge management solution - and each title would need to be noted (graphically) as to the format it is in (pdf, ppt, xls, etc).
Random Record
I am using the following code to select a random record, but it is coming back saying query is empty why? PHP Code:
Next And Previous Record
I am moving throught a set of records, my next works great but previous move to the first record. Also what is the best way to check and see if it is the first or last record in the set. if($move == "Next") { $next_rec = "select * from people where contactid > $rec_id limit 1"; $results = mysql_query($next_rec); $row = mysql_fetch_row($results); include("http://localhost/keith-homes/hyperlink.php?val=$row[0]"); exit; } elseif($move == "Previous") { $next_rec = "select * from people where contactid < $rec_id limit 1"; $results = mysql_query($next_rec); $row = mysql_fetch_row($results); include("http://localhost/keith-homes/hyperlink.php?val=$row[0]"); exit; }
Find The Value Of The Next Record
I have a database with 3 columns. my_id my_page_number other_page_data I'm creating a written page that has a link to the next page for each record in the above table. Is there a way to get the value of my_page_number for the next record so I can direct users to the next page?
Deleting A Record.
One last (hopefullly) problem I can't seem to get around for this program...why isn't this deleting the row i want? It does nothing. Now error messages either. HELP! $link = mysql_connect("localhost"); if(! $link) die("Could not connect to MySQL"); $database = "PC_Store"; mysql_select_db($database) or die ("could not open $database: ".mysql_error() ); $result = mysql_query("DELETE FROM inventorydata VALUES('$ProductID')"); The $ProductID variable is brought in from a menu choice on a diffrent page, it is also the primary of the table...so it should delete the whole row right?
Delete Record
Im some having trouble with deleting a record, surely it isnt that hard, dont know what im doing wrong. this is the error i am gettin: 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 id=1' at line 1Here is my delete code:
Get Any Record Where The First Letter Is X
Regulars have probably seen this answered hundreds of times but how do you get records with the first letter beginning with 'a' for example? I have this: $letter = $_GET['l']; // = a $query = mysql_query('SELECT alias FROM badmembers WHERE alias RLIKE "^'.$letter.'$"'); But it doesnt seem to work....
Skips First Record !! Why !???
Basically im pulling records from a mysql database. and placing the results into a simple array.. but when i echo the array values for some reason the first row/record gets skipped and the last one turn out blank as if the values got shifted or something Code:
Specific Record From DB
I have a form which updates customer information and as default this gets started on record 1. I would like to be able to post a clientname from a previous form and then get the specific data for that customer. I am fine with the posting to seperate pages stuff but how could I get the update form to start on this record? Code:
Prevent Going To Next Record In The URL
I am wondering about the best way to prevent users from going to the next record in a database by using the URL bar. So if I have this in the URL: www.site/items.php?itemno=2 I want to prevent them from going to the url and typing in 3 etc.
Record Details
I have a database of properties and have a show all records page. From that page you get an option to view all details about any record. When i choose one, how does the info from (that) record get posted to a page that displays all the info. I used form varibles, is that the best way?
Moving A Record
Is there way to move a record from one table to another ... or will i just have to get row put each field data in a variable and then insert to a new row and delete old row?
Cannot Insert Record
I have this problem where, on my pc at home with apache and sql, when testing my site on my home pc with apache and sql, everything is fine, but when i posted it on the net, none of the add records work, the files get sent, but no record inserted in my database. Strange.. Code:
Getting Last Record From The Database
I have the following table : ---------------------------------- Studnet_id | Reg_no | Std_name | etc.... ---------------------------------- - Initially all records are Null. - Student_id is Primary key. I want to read last record from the field Student_id i-e NULL and then add +1 to it to get new Student_id. Code:
Won't Display More Than One Record
I'm trying to display a list of users attached to a team, then for each user I need to pull their country and PSN and display it in the same table. Here's my current code:
Delete Record
i have this code for my site that will connect to my database and grab all my members there id email and ip the problem is that it dont have a button where you can select a member and delete that member can anyone help me with this?i want to add a button and a check box so if i check off a member and click a delete button it will delete that member here is the code:
Record Being Inserted Twice?
I have written which is intended to insert a single record I find that instead it inserts the same record twice (there's no index field). I don't know what to make of it, this is the actual code:
Best Way To Update A Mysql Record
I have a small app that a user can select an entry to be considered as "cancelled". This will change an entry in a mysql database. Is there someway of making a button that as soon as its clicked, sends the appropriate update info to the database and reloads the page?
Please Help With A Record Problem With MySql
I have php code that enters information into a mysql database. How can I make it so that the person entering the information has the choice for the listing to expire after a given number of days. Therefore I would like the record to become not active after this period.
Record From Today 0 Time ()
I have the date stored using time () which produces an 11 digit long number which is then stored in the database as an 11 digit integer in an "int" field. I'm just trying to work out how I can find all records from today according to their int time value.
Query Not Pulling First Record
The script below is supposed to pull ALL the information from a mySQL dbase by date. The problem is that it always leaves out the first record. I can't see where the problem is. Please take a look and see if you can find what I can't. Thanks.
|