-
Posts
3,671 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
Events
Posts posted by niche
-
-
Voila! Thanks for your help.
-
Interesting.
When I strip-out all the white space it works:
$stmt2->execute(array(':itemandsize' => '%' . $var . '%'));
I've heard of white space being a problem, but haven't knowingly experienced it.
Any thoughts? Urban legend?
-
This code works, but can someone tell me how I can use an array instead of bindParam in this situation.
try { $sql = ' SELECT * FROM nconnectz WHERE itemandsize LIKE :itemandsize AND price > 0 ORDER BY price ASC '; $stmt2 = $db2->prepare($sql); } catch (PDOException $e) { echo $e->getMessage() . '<br>'; } $var = "%Flour%"; try { $stmt2->bindParam(':itemandsize',$var); $stmt2->execute(); } catch (PDOException $e) { echo $e->getMessage() . '<br>'; }
Something like?
$stmt2->execute(array( :itemandsize => '%Flour%' ));
-
-
found the notation:
${$wkvar}[$i] = $val;
If this has a name, pls let me know so I can get a ref?
stumbled on to by finally googling: "dynamic naming arrays php"
-
This works: $names = array( array("name"=>"tom","gender"=>"m"), array("name"=>"jane","gender"=>"f"), array("name"=>"steve","gender"=>"m"), array("name"=>"mary","gender"=>"f"), array("name"=>"renae","gender"=>"f") ); $num = 30; $wkvar = 'wk' . $num; foreach ($names AS $val) { $wk30[] = $val; //$$wkvar[] = $val; } var_dump($wk30);
this doesn’t and gives me this error, “Fatal error: Cannot use [] for reading”, (goggle hasn’t helped me):
$names = array( array("name"=>"tom","gender"=>"m"), array("name"=>"jane","gender"=>"f"), array("name"=>"steve","gender"=>"m"), array("name"=>"mary","gender"=>"f"), array("name"=>"renae","gender"=>"f") ); $num = 30; $wkvar = 'wk' . $num; foreach ($names AS $val) { //$wk30[] = $val; $$wkvar[] = $val; } var_dump($wk30);
I need to use the 2nd (variable variable) approach. What am I doing wrong?
I tried adding a dynamic index unsuccessfully.
-
My understanding is # is for comments
-
-
where do define $from?
-
What's in $_POST['Message']?
-
Sounds like you want something like this:
https://stackoverflow.com/questions/14907863/insert-data-from-one-table-to-another-in-mysql
-
For starters, is the action really named index.php?
-
Look forward to your questions!
-
-
Great point!
-
Why not use LOAD DATA?
-
https://www.w3schools.com/sql/sql_alter.asp
Then, use the CONCAT_WS keyword
-
Experience tells me that If i'm thinking about restoring the registry, I'm probably going to get unexpected consequences. So, I'll probably just reinstall the system and get a good night's sleep.
Having the backup is one thing. Using it is another.
- 1
-
I agree that it's a bad idea.
EDIT:
I would opt for a fresh install.
-
-
-
Do a 'SELECT * FROM closed' . If no error, it's still there unless corrupted.
closed is not a reserved word, but close is.
-
More context please
-
Not with CSS.
I'd redesign the image with divs positioned around the image , with each div having a JS listener, in place of the finger points.
From Mysql To Mysqli but gives error's
in PHP
Posted · Edited by niche
I'd start with resolving the first error. Looks like there's a problem with your login to your server
EDIT:
start with config.php does it produce errors by itself?