multidimentional msql_fetch_array

08-19-08, 03:33 PM
|
|
Newbie Coder
|
|
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
multidimentional msql_fetch_array
nothing prints on my table what am i doin wrong??
|

08-19-08, 05:33 PM
|
 |
Level II Curmudgeon
|
|
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
|
|
Quote:
Originally Posted by snakeob
nothing prints on my table what am i doin wrong??
|
Maybe it's just me, but I don't see a <table> definition. I see a table row and cells, but no actual table tag.
|

08-20-08, 09:54 AM
|
|
Newbie Coder
|
|
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
its above, i dint include that portion of the code
|

08-20-08, 10:31 AM
|
|
Junior Code Guru
|
|
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
$result4 should be $query4?
$query4 = mysql_query("SELECT * FROM biller WHERE calldate LIKE '%($_POST[year])%'");
while ($row = mysql_fetch_array($result4, MYSQL_ASSOC))
|

08-20-08, 12:02 PM
|
|
Newbie Coder
|
|
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
see below for updated code i need helllp
Last edited by snakeob; 08-20-08 at 12:26 PM.
|

08-20-08, 12:25 PM
|
|
Newbie Coder
|
|
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
nothing prints on my table  please help me.....
this is supposed to get the clients the months and the year
help me pleeeeeease
|

08-21-08, 01:26 AM
|
|
Junior Code Guru
|
|
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Would it not be easyer to just go with a query like this?
took out all the database parts and tested it locally, prints a table just fine. so the problem is probably that your not finding anything in the database.
You can select COUNT(*) or use mysql_num_rows() to find out how many matches you got. COUNT(*) is faster if there are alot of them
btw, the query where you use $_POST[number] as a argument. Your saying to mysql that your looking for something similar, but not specifying any wildcard ( the % sign).
|

08-21-08, 05:01 AM
|
 |
Community Liaison
|
|
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
|
|
since nothing is getting outputted in your table it either means an error occured in one of your queries, or an error occured during the parsing of the php page (when the display_errors settings is off).
Add this line at the end of each mysql_query call, and tell us what you see:
make sure you remove the ; at the end of the line first.
Place this code snippet on top of the page:
Now you should get a clear error-output when an error occures. If still nothing is printed, there's probably something wrong in your query that's causing the database to select not a single row (no error, just a logical error).
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks
|

08-21-08, 10:12 AM
|
|
Newbie Coder
|
|
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i added
and i get stuff in my table now!
my only problem is that now my logic is ignoring my two calldate querys
basicly you have a selection of account, month, and year
my account seems to be working fine.
im using the $_POST[month] as a way of selecting the month and year for year from a different database so that i dont get any jiberish from the mysql data, and trying to search using what you have selected from previous.
mysql> SELECT * FROM biller WHERE account LIKE 8669605227 AND calldate LIKE '%Feb%';
if i type this into mysql it works fine, i just cant seem to get these $_POST to work
|

08-21-08, 11:17 AM
|
|
Newbie Coder
|
|
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i took the line completely out and it querys i realized it must be querying from my first page which follows,
because im querying from a different table to make the month and year dropdown list clean, but it is not getting from my big table, how do i combine them now??
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|