?
Solved

related questions

Posted on 2008-02-02
4
Medium Priority
?
161 Views
Last Modified: 2013-12-12
One person said:

We don't have an ARRAY datatype in MySQL. When sending the variable to the MySQL server
through the SQL command, you should cast that array to a type accepted by MySQL. If you
don't the text "array" will be inserted in the SQL statement.


Another person said:

$list="SELECT * FROM IDs WHERE ID != $ID";

$rows=mysql_query($list);
$row=mysql_fetch_assoc($rows);
$table_name=$row["field_name"];

$rank="SELECT * FROM $table_name ORDER BY vote DESC";


If $table_name is one row instead of an array of rows, how can $table_name be ordered???
0
Comment
Question by:locke2005
4 Comments
 
LVL 15

Assisted Solution

by:babuno5
babuno5 earned 600 total points
ID: 20806946
0
 

Author Comment

by:locke2005
ID: 20807467
Too complicated! :-(
0
 
LVL 16

Accepted Solution

by:
dr_dedo earned 1000 total points
ID: 20807480
$table_name cant be an array of rows as mysql_fetach functions return only one row at a time, so, there is no way that $table_name be an array even if it returns a hundred row.
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 400 total points
ID: 20807933

If $table_name is one row instead of an array of rows, how can $table_name be ordered???

>> just print it using

<?php

print '<pre>';
print_r ($table_name);
print '</pre>';
?>

then, use for..each loop ...
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question