Tagged Questions
0
votes
1answer
22 views
Efficient way to query database from an array
I have an array containing about 400 10-20 character, single string number items. I want to query my database from this array in the most efficient way (on server load and load time) possible. Here is ...
0
votes
2answers
49 views
PHP MySQL fetch result and display
Trying to learn some more PHP and MySQL here now, and I'm having problems understanding how this works. I do know other languages, so I'm hoping I will understand PHP much better if I just can get ...
3
votes
3answers
32 views
Model returning null values
I'm a new bee to web development. I need to get data (some columns) from the job table and filter it according to the user name in the session and a status value (status is a TINYINT there for ...
0
votes
1answer
26 views
Finding specific key and return value in a multidimentional array
Consider the array below:
//$allmembers
Array
(
[0] => Array
(
[id] => 7
[name] => John Smith
)
[1] => Array
(
[id] ...
0
votes
1answer
45 views
Need to rewrite these into 1 faster query
I build an array and then foreach array item I perform a large query. I need to write this into 1 query but don't know how.
$arr_websites = array();
$sql = mysql_query("select `website` from `leads` ...
0
votes
1answer
28 views
PHP - Displaying one array based on another array
Ultimately I'm just trying to build a page that imports a csv file into a mysql db.
I've imported the csv successfully. And I've set up the page so the user selects from a dropdown what field from ...
0
votes
1answer
56 views
MySql empty result set returns different formats
I am trying to execute two simple select queries on two different tables in mysql server. This I am doing this by running a php script. Both the queries are supposed to return an empty result set. But ...
0
votes
1answer
42 views
Getting Array with MySQL
I have a form with the fields Name, Email, and City. City is an autocomplete field that calls 3 separate tables (Cities, Regions, Countries).
What I'd like to do is to have these explode into an ...
-5
votes
1answer
55 views
Function expects array to be string, convert?
Before downvoting you can atleast write what is bothering you, jesus christ this arogance
I get "Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in bla bla..." ...
0
votes
1answer
49 views
PHP - MYSQL Query multiple values from an array
I want to run an insert query in a loop until all the elements from an array pass.
Ex:
$signs = array("aries", "taurus", "gemini", "cancer", "leo", "virgo", "libra", "scorpio", "sagittarius", ...
1
vote
2answers
37 views
Arrays in MySQL? [duplicate]
I have a database that's formatted like this:
URLID USERNAME URL
0 jake abc.com
1 jake 123.com
2 po google.com
3 po googl3.com
4 po ...
0
votes
2answers
57 views
automatically generate update form with array
$resultUpdate = Nemesis::select("*", $table, "id = '{$id}'");
if (!$resultUpdate) {
self::show_error(QUERY_ERROR);
} elseif ($resultUpdate->num_rows > 0) {
$out .= '<div ...
1
vote
3answers
41 views
Best practices of dealing with very large arrays? DB?
In another question, I stated that I was running a php script that grabbed 150 rows of data from a mysql database, then did some calculations on that data, which it put into an array (120 elements ...
0
votes
2answers
53 views
get a previous array value
I am making a php chat system and I would like to add a header for each day.
In order to achieve this I need a way to get both the current message date and the previous messgage date from my ...
0
votes
4answers
95 views
Array Results in PHP
Is it possible to limit the results shown from a MYSQL database?
At the moment the results are shown in a html table, how do I only show the newest entries?
<?php
$con = ...