Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-15-2007, 12:16 PM   #1
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
Mysql gurus in here

Folks I imported about 20k rows into my table. Some rows show, some do not. Here's the funky part. If I go into an entry and save it (even if I change no data) it will show when I "select *"
I figured it was the query cache so I reset it. That didn't do it. How can I get all of the entries to show?
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 12:26 PM   #2
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
it would help to know how are you viewing the data? the command line? phpMyAdmin? your own script?
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 12:30 PM   #3
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
Quote:
Originally Posted by borked View Post
it would help to know how are you viewing the data? the command line? phpMyAdmin? your own script?
$result = mysql_query("select * from myTable where category = '".$insertCat."' && approved = 1 limit 5");

php
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 01:01 PM   #4
Adultnet
Confirmed User
 
Join Date: Sep 2003
Posts: 8,713
you have a limit set to 5?
__________________


TrafficCashGold Paying Webmasters Since 1996!

Awesome Conversions! Fast Weekly Payments! Over 125 Tours!
Adultnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 01:07 PM   #5
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
Quote:
Originally Posted by Adultnet View Post
you have a limit set to 5?
Yeah, no kidding. That's not what is causing it. I have 20 categories. 1,000 entries per. some categories display 0 results despite the limit.
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 01:09 PM   #6
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
I should reiterate it is not a cache issue. I have run mysqladmin flush-tables and it clears everything. Even reloaded.
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 01:12 PM   #7
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Maybe a problem with $insertCat variable?
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 01:14 PM   #8
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
plus, get into the habit of putting backticks around your query:

SELECT * FROM `myTable` WHERE `category` = '".$insertCat."' AND `approved` = 1 LIMIT 5;

trust me - there are lots of words in mysql syntax that if used as a row/table description would cause headaches.
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 02:33 PM   #9
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
Quote:
Originally Posted by borked View Post
Maybe a problem with $insertCat variable?
Negative. Can't be that because I can echo the var just fine when pulling it into my function. It's something mysql related.
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 02:38 PM   #10
xenilk
Confirmed User
 
xenilk's Avatar
 
Join Date: Jan 2006
Location: Canuck land!
Posts: 921
I wouldn't blame MySQL just yet. It's pretty damn hard to tell what's wrong with 1 php line and a somewhat vague description of the problem.
xenilk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 03:18 PM   #11
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by BradM View Post
Negative. Can't be that because I can echo the var just fine when pulling it into my function. It's something mysql related.
Well, as you know, the sql syntax is ok (although I didn't know you could use '&&' - I've always used 'AND'), so all I can say, it has to be something weird with the var.

If this isn't an if loop, then just echo the sql query, and run it in mysql at the command line (or phpmyadmin) and see if the output matches your scripts...
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-15-2007, 03:19 PM   #12
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
btw, the cache never borks like that - it hashes the mysql table and if the table has changed since the last cache, the cache is deleted and the query goes directly to mysql
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.