Search found 54 matches

by gotornot
Tue Feb 10, 2015 8:12 am
Forum: PHP - Code
Topic: SQL Injection
Replies: 3
Views: 1031

Re: SQL Injection

i dont understand what you mean why wouldnt it return true??
by gotornot
Tue Feb 10, 2015 8:03 am
Forum: PHP - Code
Topic: SQL Injection
Replies: 3
Views: 1031

SQL Injection

Hi I am really struggling here i want this to check for fobidden words in an effort to stop sql injection. I cant seem to get it to work :( function secureit() { global $items_check; $unallowed = array('href', 'www', 'UPDATE', 'INSERT', 'DELETE', 'SET', 'OFFSET', 'ORDER BY', 'union', 'UPDATE', 'DROP...
by gotornot
Mon Apr 01, 2013 1:21 pm
Forum: PHP - Code
Topic: Php and RAM
Replies: 1
Views: 760

Php and RAM

Hi All I have a site that holds over 900k of products. I am searching on my db and its taking 10 seconds to search products and bring back results. I wondered if i stored the data in the ram the results would be instantanious. Does anyone have any experience or could point me in the right direction ...
by gotornot
Tue Mar 05, 2013 1:59 am
Forum: PHP - Code
Topic: PHP + MySQL = Cache Problem
Replies: 2
Views: 858

PHP + MySQL = Cache Problem

Hi All I have a site that is taking a bunch of feeds from other sites, normalizing the data into a product file. I also have a "Google" like search engine that a user can use to searh this data and get desired results. I have nearly 1m products and it takes 1 user only approximately 10 sec...
by gotornot
Fri Feb 15, 2013 4:44 pm
Forum: PHP - Code
Topic: counting rows
Replies: 5
Views: 1105

Re: counting rows

a faster count would be helpfuil
by gotornot
Fri Feb 15, 2013 4:27 pm
Forum: PHP - Code
Topic: counting rows
Replies: 5
Views: 1105

counting rows

Hi All I have a DB with over 950,000 rows and i want to be able to count how many rows are in the table. The only trouble is a mysql_num_rows statement takes ages i need something a lot quicker. This is what im using crrently and it doesnt work. any help would be great. <?php $qx = "select coun...
by gotornot
Wed Jul 18, 2012 3:13 am
Forum: PHP - Code
Topic: Loading Data into Cache
Replies: 1
Views: 297

Loading Data into Cache

Hi All I have a database with 1million products in and I'm finding no matter how i index it to be slow when getting results. I have basically built a search engine that looks up the results. Is their anyway of loading all this data which is less than 1gig into the ram (Cache) would that speed the se...
by gotornot
Tue Jun 26, 2012 4:42 pm
Forum: Javascript
Topic: PHP & JQUERY
Replies: 1
Views: 1374

PHP & JQUERY

Hi i am trying to get a search box to work on both click a button or an enter action yet i cant get the enter action to work as well as enter. I know this isnt strictly php but i am using all php functions with the search and wondered if anyone could help. This is my code: <script type="text/ja...
by gotornot
Mon Jun 25, 2012 10:20 am
Forum: PHP - Code
Topic: zip_entry_read() memory problem
Replies: 1
Views: 396

zip_entry_read() memory problem

Hi Really racking my brain on what i need to do here: I am using the file reader and ned to know how i clear the memory out so that i can re-use it. $zip = zip_open("$file_name"); if ($zip){ while ($zip_entry = zip_read($zip)){ $zip_size = 0; $zip_size = zip_entry_filesize($zip_entry); ech...
by gotornot
Wed May 16, 2012 5:54 pm
Forum: PHP - Code
Topic: PHP & JQUERY
Replies: 2
Views: 865

PHP & JQUERY

Hi All (Again) I am looking to pick up variables in jquery from a string created: function search_by() { var search_term = $('#search_for', $(this).attr('value')); alert(search_term); } I cant seem to get the value i am trying to into a "var". This is the code on the page i am using a onCl...
by gotornot
Wed May 16, 2012 4:29 pm
Forum: PHP - Code
Topic: Counting Instances and then displaying a result.
Replies: 5
Views: 1442

Re: Counting Instances and then displaying a result.

i have tried including it in a while statement and outside
not sure how to execute it to be honest
by gotornot
Wed May 16, 2012 3:55 pm
Forum: PHP - Code
Topic: Counting Instances and then displaying a result.
Replies: 5
Views: 1442

Re: Counting Instances and then displaying a result.

Will this give a list of multiple results without displaying them:
[ Laptops(127) - Accesories (244) - Components(65) ]
by gotornot
Wed May 16, 2012 3:34 pm
Forum: PHP - Code
Topic: Counting Instances and then displaying a result.
Replies: 5
Views: 1442

Counting Instances and then displaying a result.

Hi I am building a product search engine using MySql and PHP (Jquery / AJAX). As i am getting the search results i wondered is it possible to count the instances of a category? For example: If i search for "Dell Laptops" i get 400+ results back because it has lots of laptops and accessorie...
by gotornot
Wed May 16, 2012 6:36 am
Forum: PHP - Code
Topic: PHP Search Query
Replies: 1
Views: 853

PHP Search Query

Hi All. I am looking to search a database of products based upon someone typing the name of the product they are looking for. I am using the below SQL request: Unfortunately this only shows what ever your typing and anything before or after (%) is there any way that it could also search unplaced str...
by gotornot
Mon Mar 26, 2012 12:23 pm
Forum: PHP - Code
Topic: DOM Object Help
Replies: 5
Views: 223

Re: DOM Object Help

i tried that but not got much help.