Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Php, Sometime A Strange Thing Is Happen When Get Data From Db
Jessica replied to pascal_22's topic in PHP Coding Help
I think you have some messed up data. To try to eliminate that as a possibility, I suggest you run the actual query in mysql/phpmyadmin, and to get the accurate query you'll want to echo it after building it. $strSql = "select * from Profils inner join ........... where Profils.NomUsager='" . $NomUsager . "'"; echo $strSql; // Add this $MonProfil = mysql_query($strSql,$cn) or die(mysql_error()); And run it in your choice of mysql interface and tell me if you get 1 row or more. -
Select Syntax - Is "something = ('this' Or 'that' Or 'other')" Ok?
Jessica replied to lb3000's topic in MySQL Help
How can something = 'that' AND something = 'other'??? -
Php, Sometime A Strange Thing Is Happen When Get Data From Db
Jessica replied to pascal_22's topic in PHP Coding Help
So you just ignore our attempts to help...ok. -
Populating My Database With Information From A Html Form
Jessica replied to dinita's topic in MySQL Help
What is the error? Your data structure is WAY off. You should not have 4 different answer tables. You also need to store the foreign keys like the quiz_id, question_id, etc in the answers and questions. -
Select Syntax - Is "something = ('this' Or 'that' Or 'other')" Ok?
Jessica replied to lb3000's topic in MySQL Help
So, you picked the longer, harder to read one.... -
If you want the data to change without reloading the page, that's ajax. If you're just asking how to select based on the user's selection, with a page reload, you'd put that select box in a form, use $_POST to get the variable, then put it in the WHERE clause.
-
Select Syntax - Is "something = ('this' Or 'that' Or 'other')" Ok?
Jessica replied to lb3000's topic in MySQL Help
I'm 99% sure MySQL does not let you do where column = ('value' OR 'value'). You would do column = 'value' OR column = 'value'. Or using IN(). What is happening is MySQL is only going to do (according to your latest post): SELECT DISTINCT * FROM table WHERE something = 'this' AND thingamajig = 'one' And the rest of it is ignored. You're saying "SELECT * FROM table WHERE bob Bob what? It doesn't mean anything. In that case, you'd have to do: SELECT DISTINCT * FROM table WHERE something IN('this', 'that', 'the other') AND thingamajig IN ('one', 'two') OR SELECT DISTINCT * FROM table WHERE (something = 'this' OR something = 'that' OR something = 'the other') AND (thingamajig = 'one' OR thingamajig = 'two') One is much easier to read. You may also want to just join to another table if possible. -
I said that for the longest time. Then I just did it. It's awesome. Our office has a ton of people standing and the desks are easy to configure.
-
Select Syntax - Is "something = ('this' Or 'that' Or 'other')" Ok?
Jessica replied to lb3000's topic in MySQL Help
I'm fairly certain neither of those would even work at all. You should use the parens to organize your precedence. -
Php, Sometime A Strange Thing Is Happen When Get Data From Db
Jessica replied to pascal_22's topic in PHP Coding Help
Echo the query to the screen, and then run it directly in MySQL/phpMyAdmin. What do you get? -
In case you missed it the last time: USE CODE TAGS! See the link in my signature on debugging SQL. What is the URL of the page? What do you see when you print_r($_GET)?
-
if you think in a month you'll remember what m_s, m_e, m_c, m_d, m_a and m_z are, then fine. x and y are obviously axes. The rest of it doesn't make any damn sense.
-
Here's my at-work workspace. My cabinet has magnetic instagram photos of my family, and my desk is raised for standing. I'll take a photo of my home office at some point, I'm still decorating it.
-
Post your code. Lines 64-88 or so.
-
Implode Removing \\ From Mysql_Real_Escape_String
Jessica replied to richiejones24's topic in PHP Coding Help
And how do you KNOW that is happening? There's nothing in your code that does an echo or dump of the data. -
The phrase "occur more 3 days" doesn't make any sense. Whatever you're trying to do, you'll probably use BETWEEN and/or DATE_SUB() or DATE_ADD()
-
Implode Removing \\ From Mysql_Real_Escape_String
Jessica replied to richiejones24's topic in PHP Coding Help
implode does not affect the values within the array. Post the code. -
Php, Sometime A Strange Thing Is Happen When Get Data From Db
Jessica replied to pascal_22's topic in PHP Coding Help
What's the query you use to select the data? Are there duplicate rows for the users in any way? -
Regex For A Specific Email Address "@shrewsbury.ac.uk"
Jessica replied to jbonnett's topic in Regex Help
And? -
For one thing, you need to use some variable names that MEAN something. Next, actually explain what you are trying to do, what's not working, what you expect, what you get.
-
Is XAMPP running? I know with WampServer it doesn't start automatically, you have to start up the webserver after install. Also make sure the file ends in .php truly, not something like file.php.txt.
-
There's not much reason to in this example, OP could be using PDO for a better way to do the same thing.
-
White_lily look up sprintf.
-
You never try to use $_GET['id'] as far as I can see.
-
Pass Multidimensional Array In Mysql Database
Jessica replied to rochellecanale's topic in Frameworks
Don't implode it into a string! Loop through the array and Use MySQL multi insert syntax to create all the new rows you need.