bubblegum.anarchy
Members-
Posts
526 -
Joined
-
Last visited
Never
Everything posted by bubblegum.anarchy
-
How is this related to mySQL?
-
flash[8] + php + sql - fetch entries by titleID
bubblegum.anarchy replied to tome's topic in MySQL Help
SELECT * FROM guestbook WHERE titleID = {$titleID} $titleID would first require approriate injection protection if the value is being passed from browser input. something like settype($titleID, "integer"); to ensure that $titleID holds an integer rather than malicious mysql code. -
no
-
Define the format in mySQL with str_to_date() UPDATE table SET date = date_format(str_to_date(date, '%Y-%d-%m'), '%Y-%m-%d')
-
flash[8] + php + sql - fetch entries by titleID
bubblegum.anarchy replied to tome's topic in MySQL Help
no no - post the string stored in the variable $sql during the files processing, not the entire files code. -
um.. I don't know, how about replace ENGINE with TYPE. EDIT: FYI - the above create query works perfectly fine via SQLyog and also try removing the backticks from the KEY column names: KEY `group_id` (group_id), KEY `forum_id` (forum_id)
-
Remove the space between the closing paranthesis and the word ENGINE.
-
Open the sql dump in vim and see whats what.
-
well.. the error is near the weird characters: MySQL: You have an error in your SQL syntax near '-- phpMyAdmin SQL Dump CREATE TABLE `bbnboard_auth_access` ( `group_id` med' at line 1
-
Remove the line that is causing issues since the issue appears to be related to the commenting prefix in a commented line.
-
[SOLVED] inserting the values of a list into a table
bubblegum.anarchy replied to phpsql1's topic in MySQL Help
One insert at a time for each value in the select box. -
flash[8] + php + sql - fetch entries by titleID
bubblegum.anarchy replied to tome's topic in MySQL Help
Post the string stored in $sql. -
This was extremely tough: SELECT games.division, games.user, sum(games.payout) FROM games INNER JOIN ( SELECT substring_index(group_concat(pkey ORDER BY games.division, games.user, games.payout DESC), ',', 3) AS top_three_pkey FROM games GROUP BY games.division, games.user ORDER BY games.division, games.user, games.payout ) AS top_three ON find_in_set(games.pkey, top_three_pkey) GROUP BY games.division, games.user
-
[SOLVED] inserting the values of a list into a table
bubblegum.anarchy replied to phpsql1's topic in MySQL Help
There is no problem - the $_POST data is supposed to only hold one item, the selected item, this is the purpose of the $_POST data. -
Need an idea of what is causing this problem
bubblegum.anarchy replied to simcoweb's topic in MySQL Help
yeah, try REPAIR TABLE -
http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html
-
[SOLVED] SQL Syntax INSERT with _POST Data
bubblegum.anarchy replied to nightcrawler's topic in MySQL Help
yeah, apply mysql_real_escape_string() to each $_POST value and add quotes. ... and the ending paranthesis is missing. -
[SOLVED] Selct-Statement doesent´t work anymore
bubblegum.anarchy replied to isar21's topic in MySQL Help
ORDER BY defaults to ASC - no need to explicitly define the sort direction. isar21: post the complete SQL query, and also where the $select, $from, $where and $how variables are combined. -
[SOLVED] inserting the values of a list into a table
bubblegum.anarchy replied to phpsql1's topic in MySQL Help
$_POST['typeList'] holds one item, the selected item. -
Make no difference compared to what? The number of records in a table is more costly than the number of tables in a database, afaik.
-
SELECT sum(Time_Taken) FROM call_event WHERE call_id = $call_ID
-
$count_query = mysql_query('SELECT COUNT(*) FROM table'); $getcount = mysql_fetch_row($count_query); $count = $getcount['0']; vs. $count_query = mysql_query('SELECT * FROM table'); $count = mysql_num_rows($count_query); One record is loaded into memory vs all the records loaded into memory $query = mysql_query('SELECT * FROM table'); if (!$query) die(mysql_error()); vs. $query = mysql_query('SELECT * FROM table') or die(mysql_error()) not a great deal or difference - readability mostly.
-
Sessions can also store the shopping progress and when complete be placed into the database as a more permanent record.
-
Probably one of the best aspects of MySQL procedures is the ability to move all the common database abstraction done in php (or whatever language) back to the more appropriate location of MySQL. So instead of a php file that contains a common function to return account details, the same function can be defined in a procedure and used simply in php or any other language base.
-
Why are you expecting a result if you are getting a zero row count ?